]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/static/css/rustdoc.css
rustdoc: use flexbox CSS to align sidebar button instead of position
[rust.git] / src / librustdoc / html / static / css / rustdoc.css
index 2335f3ff1ce96a3c3026f900c5c11c5708c45a9f..6574155ce58671854b9f29930e80d373e8f6ba1c 100644 (file)
@@ -701,6 +701,8 @@ a {
 }
 
 .small-section-header {
+       /* fields use <span> tags, but should get their own lines */
+       display: block;
        position: relative;
 }
 
@@ -728,9 +730,6 @@ a {
 h2.small-section-header > .anchor {
        padding-right: 6px;
 }
-.anchor::before {
-       content: 'ยง';
-}
 
 .main-heading a:hover,
 .example-wrap > pre.rust a:hover,
@@ -785,8 +784,7 @@ table,
        margin-top: 0;
        white-space: nowrap;
        /* flex layout allows shrinking the <select> appropriately if it becomes too large */
-       display: inline-flex;
-       max-width: 100%;
+       display: flex;
        /* make things look like in a line, despite the fact that we're using a layout
        with boxes (i.e. from the flex layout) */
        align-items: baseline;
@@ -932,7 +930,6 @@ so that we can apply CSS-filters to change the arrow color in themes */
        right: var(--popover-arrow-offset);
        border: solid var(--border-color);
        border-width: 1px 1px 0 0;
-       display: inline-block;
        padding: 4px;
        transform: rotate(-45deg);
        top: -5px;
@@ -1142,7 +1139,6 @@ pre.rust .doccomment {
 .example-wrap .tooltip {
        position: absolute;
        display: block;
-       cursor: pointer;
        left: -25px;
        top: 5px;
 }
@@ -1200,7 +1196,6 @@ pre.rust .doccomment {
 }
 
 a.test-arrow {
-       display: inline-block;
        visibility: hidden;
        position: absolute;
        padding: 5px 10px 5px 10px;
@@ -1333,8 +1328,8 @@ a.test-arrow:hover {
        border-bottom: 1px solid;
        display: flex;
        height: 40px;
-       justify-content: center;
-       align-items: center;
+       justify-content: stretch;
+       align-items: stretch;
        z-index: 10;
 }
 #source-sidebar {
@@ -1347,6 +1342,13 @@ a.test-arrow:hover {
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 6px;
 }
+#source-sidebar div.files > a:hover, details.dir-entry summary:hover,
+#source-sidebar div.files > a:focus, details.dir-entry summary:focus {
+       background-color: var(--source-sidebar-background-hover);
+}
+#source-sidebar div.files > a.selected {
+       background-color: var(--source-sidebar-background-selected);
+}
 #sidebar-toggle > button {
        font-size: inherit;
        font-weight: bold;
@@ -1355,13 +1357,7 @@ a.test-arrow:hover {
        text-align: center;
        border: none;
        outline: none;
-       position: absolute;
-       top: 0;
-       bottom: 0;
-       left: 0;
-       right: 0;
-       /* work around button layout strangeness: https://stackoverflow.com/q/7271561 */
-       width: 100%;
+       flex: 1 1;
        /* iOS button gradient: https://stackoverflow.com/q/5438567 */
        -webkit-appearance: none;
        opacity: 1;