forge
Explore
Log in

Don't you dare go Hollow

The light and dark colour tabs show their labels on phones and sit centred

Browse files at this commit

c7331fd789cb51dd1e015383d0ecae696c174e8cAhmet Kaan GümüşParent: 3d0c5e6
  • fix
    • the light and dark colour tabs show their labels on phones and sit centred
Show full message
🐛 fix: the light and dark colour tabs show their labels on phones and sit centred
style/main.scssmodified+15 -9
@@ -2166,18 +2166,24 @@ code {
2166 height: var(--control-h);2166 height: var(--control-h);
2167 min-height: 0;2167 min-height: 0;
2168 border-radius: var(--radius-full);2168 border-radius: var(--radius-full);
2169-
2170- // Text-only segments: keep the words on phones too (the shared rule hides them for icons).
2171- .segment > span {
2172- width: auto;
2173- height: calc(var(--control-h) - 6px);
2174- padding: 0 12px;
2175- font-size: 0.8125rem;
2176- line-height: 1;
2177- }
2178 }2169 }
2179 }2170 }
2180 2171
2172+// Text-only segmented controls (the sidebar side and the colour tabs). They keep their words on
2173+// phones (the shared 480px rule hides them for icons), and the 12px padding replaces the 32px
2174+// icon padding, so the label sits centred in the pill.
2175+.side-picker .segmented .segment > span,
2176+.colour-tabs.segmented .segment > span {
2177+ width: auto;
2178+ padding: 0 12px;
2179+ font-size: 0.8125rem;
2180+ line-height: 1;
2181+}
2182+
2183+.side-picker .segmented .segment > span {
2184+ height: calc(var(--control-h) - 6px);
2185+}
2186+
2181 // One card for both themes, with Light and Dark tabs. nav.js sets data-tab on the card; the panel2187 // One card for both themes, with Light and Dark tabs. nav.js sets data-tab on the card; the panel
2182 // that is not shown is hidden, but it stays in the form, so a save still posts all four colours.2188 // that is not shown is hidden, but it stays in the form, so a save still posts all four colours.
2183 .colour-group[data-tab="light"] > .colour-panel[data-colour-panel="dark"],2189 .colour-group[data-tab="light"] > .colour-panel[data-colour-panel="dark"],