Providing a base/default css #122
-
I'd love to see a @import 'agnostic-svelte/css/common.properties.min.css';
@import 'agnostic-svelte/css/common.resets.min.css';
...
body {
/* https://github.com/AgnosticUI/agnosticui/blob/master/agnostic-css/public/css-src/typography.css */
font-family: var(--agnostic-font-family-body);
font-size: var(--agnostic-body);
color: var(--agnostic-font-color);
-webkit-font-smoothing: antialiased;
}
p {
max-width: 75ch;
}
/* https://github.com/AgnosticUI/agnosticui/blob/master/agnostic-css/public/css-src/typography.css */
h1 {
font-size: var(--agnostic-h2);
}
h2 {
font-size: var(--agnostic-h3);
}
h3 {
font-size: var(--agnostic-h4);
}
h4 {
font-size: var(--agnostic-h5);
} I'd been able to move much faster if the wisdom and experience of this team had gone ahead and put things in place that will, in my opinion, become very boiler-plate (and cause friction to new adopters).
What are your all's thoughts? Would you just suggest people bring their own reset, normalize, sanitize, etc.? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
I like this idea overall. I think there'd be a delicate balance between too opinionated vs not opinionated enough. Especially for line measures as that depends on so many factors. My sense is I could make this defaults script as an opt-in module. My instinct thus would be to not include it in Do you agree? Besides the example you've shown is there anything else you'd expect to see in a n opt in defaults script? /* ideas */
*,
*:after,
*:before {
box-sizing: inherit;
}
html {
box-sizing: border-box;
}
/* block quotes?
Clamped headings? But then we'd have to be careful and weigh benefits vs risk and complexity for zooming cases:
https://www.smashingmagazine.com/2022/01/modern-fluid-typography-css-clamp/#accessibility-concerns
*/ Update: Looks at html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
} Looking at some lighter weight frameworks I don't see much in addition to above plus what you've showed. I'm a bit nervous about the paragraph |
Beta Was this translation helpful? Give feedback.
-
I think #123 provides this now. Thanks for the recommendation! |
Beta Was this translation helpful? Give feedback.
I think #123 provides this now. Thanks for the recommendation!