Untangle base styles

This commit is contained in:
Eric Bailey
2024-09-23 14:19:24 -05:00
parent 88bd47eb26
commit 61e004e3ac
4 changed files with 46 additions and 71 deletions
+20 -20
View File
@@ -38,38 +38,38 @@
* *
* ALL OTHER STYLES BELONG IN `src/style.css` * ALL OTHER STYLES BELONG IN `src/style.css`
* *
* THIS NEEDS TO BE DUPLICATED IN `web/index.html` * THIS NEEDS TO BE DUPLICATED IN `bskyweb/templates/base.html`
*/ */
:root { html {
--background: white; background-color: white;
scrollbar-gutter: stable both-edges;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--background: black;
}
}
html { html {
height: calc(100% + env(safe-area-inset-top)); background-color: black;
scrollbar-gutter: stable both-edges; }
}
html,
body {
margin: 0px;
padding: 0px;
font-family: 'Inter-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif;
text-rendering: optimizeLegibility;
/* Platform-specific reset */
-webkit-overflow-scrolling: touch;
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-ms-overflow-style: scrollbar;
font-synthesis-weight: none;
} }
html, html,
body, body,
#root { #root {
display: flex; display: flex;
flex: 1 0 auto; flex: 1 0 auto;
width: 100%;
margin: 0px;
padding: 0px;
min-height: 100%; min-height: 100%;
font-family: 'Inter-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif;
background-color: var(--background);
-webkit-overflow-scrolling: touch;
/* Prevent text size change on orientation change https://gist.github.com/tfausak/2222823#file-ios-8-web-app-html-L138 */
-webkit-text-size-adjust: 100%;
} }
#splash { #splash {
position: fixed; position: fixed;
width: 100px; width: 100px;
+1
View File
@@ -303,6 +303,7 @@ export function createThemes({
negative_950: `hsl(${hues.negative}, 91%, ${dimScale[12]}%)`, negative_950: `hsl(${hues.negative}, 91%, ${dimScale[12]}%)`,
negative_975: `hsl(${hues.negative}, 91%, ${dimScale[13]}%)`, negative_975: `hsl(${hues.negative}, 91%, ${dimScale[13]}%)`,
} as const } as const
console.log(dimPalette)
const light: Theme = { const light: Theme = {
name: 'light', name: 'light',
+8 -34
View File
@@ -104,7 +104,9 @@
*/ */
/** /**
* BEGIN STYLE * BEGIN STYLES
*
* HTML & BODY STYLES IN `web/index.html` and `bskyweb/templates/base.html`
*/ */
:root { :root {
--text: black; --text: black;
@@ -120,53 +122,25 @@
} }
} }
html {
height: calc(100% + env(safe-area-inset-top));
scrollbar-gutter: stable both-edges;
}
html,
body,
#root {
display: flex;
flex: 1 0 auto;
width: 100%;
margin: 0px;
padding: 0px;
min-height: 100%;
font-family: 'Inter-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif;
background-color: var(--background);
/* Platform-specific */
-webkit-overflow-scrolling: touch;
/* Prevent text size change on orientation change https://gist.github.com/tfausak/2222823#file-ios-8-web-app-html-L138 */
-webkit-text-size-adjust: 100%;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-ms-overflow-style: scrollbar;
font-synthesis-weight: none;
}
html.theme--light { html.theme--light {
--text: black; --text: black;
--background: white; --background: white;
--backgroundLight: hsl(211, 20%, 95%); --backgroundLight: hsl(211, 20%, 95%);
background-color: white;
} }
html.theme--dark { html.theme--dark {
color-scheme: dark;
background-color: black;
--text: white; --text: white;
--background: black; --background: black;
--backgroundLight: hsl(211, 20%, 20%); --backgroundLight: hsl(211, 20%, 20%);
color-scheme: dark;
} }
html.theme--dim { html.theme--dim {
color-scheme: dark;
background-color: hsl(211, 28%, 12%);
--text: white; --text: white;
--background: hsl(211, 20%, 4%); --background: hsl(211, 20%, 4%);
--backgroundLight: hsl(211, 20%, 10%); --backgroundLight: hsl(211, 20%, 10%);
color-scheme: dark;
}
body {
overflow-y: auto;
overscroll-behavior-y: none;
} }
/* Buttons and inputs have a font set by UA, so we'll have to reset that */ /* Buttons and inputs have a font set by UA, so we'll have to reset that */
+19 -19
View File
@@ -45,36 +45,36 @@
* *
* THIS NEEDS TO BE DUPLICATED IN `bskyweb/templates/base.html` * THIS NEEDS TO BE DUPLICATED IN `bskyweb/templates/base.html`
*/ */
:root { html {
--background: white; background-color: white;
scrollbar-gutter: stable both-edges;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--background: black;
}
}
html { html {
height: calc(100% + env(safe-area-inset-top)); background-color: black;
scrollbar-gutter: stable both-edges; }
}
html,
body {
margin: 0px;
padding: 0px;
font-family: 'Inter-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif;
text-rendering: optimizeLegibility;
/* Platform-specific reset */
-webkit-overflow-scrolling: touch;
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-ms-overflow-style: scrollbar;
font-synthesis-weight: none;
} }
html, html,
body, body,
#root { #root {
display: flex; display: flex;
flex: 1 0 auto; flex: 1 0 auto;
width: 100%;
margin: 0px;
padding: 0px;
min-height: 100%; min-height: 100%;
font-family: 'Inter-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif;
background-color: var(--background);
-webkit-overflow-scrolling: touch;
/* Prevent text size change on orientation change https://gist.github.com/tfausak/2222823#file-ios-8-web-app-html-L138 */
-webkit-text-size-adjust: 100%;
} }
#splash { #splash {
position: fixed; position: fixed;
width: 100px; width: 100px;