-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance css reset #211
base: trunk
Are you sure you want to change the base?
Enhance css reset #211
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Custom Selectors | ||
* ...grouping of selectors to make life easier to manage | ||
*/ | ||
|
||
/* All heading levels supported */ | ||
@custom-selector :--headings h1, h2, h3, h4, h5, h6; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@import url("reset.css"); | ||
@import url("colors.css"); | ||
@import url("media-queries.css"); | ||
@import url("custom-selectors.css"); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import url("reset.css"); | ||
@import url("mixins.css"); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Mixins | ||
* Use mixins to keep code DRY where viable | ||
*/ | ||
|
||
/* | ||
@define-mixin icon $name { | ||
padding-left: 16px; | ||
&::after { | ||
content: ""; | ||
background: url(/icons/$(name).png); | ||
} | ||
} | ||
|
||
.search { | ||
@mixin icon search; | ||
} | ||
} */ |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,83 @@ | ||||||||
/** | ||||||||
* Reset.css | ||||||||
* Custom reset enhancments. | ||||||||
* Primary reset is modern-normalize (by default) | ||||||||
* imported in ../style.css | ||||||||
*/ | ||||||||
|
||||||||
/* | ||||||||
* Reset spacing & font inheritance | ||||||||
* | ||||||||
* Font iheriance: We add intentional font inheritence as there are browser | ||||||||
* inconstencies as well as some instances where lacking implecit inheritence | ||||||||
* can cause challenges | ||||||||
* | ||||||||
* Margin & Padding reset: We reset margin and padding to 0 to ensure a | ||||||||
* consistentstarting point for all elements | ||||||||
*/ | ||||||||
* { | ||||||||
font: inherit; | ||||||||
margin: 0; | ||||||||
padding: 0; | ||||||||
} | ||||||||
|
||||||||
html { | ||||||||
|
||||||||
/* enable dark and light color schemes by default */ | ||||||||
color-scheme: dark light; /* stylelint-disable-line scale-unlimited/declaration-strict-value */ | ||||||||
|
||||||||
/* enable hanging punctuation */ | ||||||||
hanging-punctuation: first last; /* stylelint-disable-line scale-unlimited/declaration-strict-value */ | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing here with the stylelint override |
||||||||
} | ||||||||
|
||||||||
/* | ||||||||
* Ensure body is at least 100% of viewport height | ||||||||
*/ | ||||||||
body { | ||||||||
min-height: 100svh; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we be using
Suggested change
|
||||||||
} | ||||||||
|
||||||||
/* | ||||||||
* Responsive media | ||||||||
*/ | ||||||||
img, | ||||||||
picture, | ||||||||
svg, | ||||||||
video { | ||||||||
display: block; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a strong believer in setting images to |
||||||||
max-width: 100%; | ||||||||
} | ||||||||
|
||||||||
:--headings { | ||||||||
text-wrap: balance; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
} | ||||||||
|
||||||||
p { | ||||||||
|
||||||||
/* | ||||||||
* Adding a readable max width to all paragraphs to prevent | ||||||||
* long lines of text. | ||||||||
* | ||||||||
* NOTE: if using the lobomized owl technique - this style may be overridden | ||||||||
*/ | ||||||||
max-width: 75ch; /* 75 characters - may wish to replace with custom property */ | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is too opinionated for the scaffold |
||||||||
text-wrap: pretty; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this has a negative impact on performance, while I was hesitant on all headings by default, definitely shouldn't happen on all paragraphs |
||||||||
} | ||||||||
|
||||||||
/* | ||||||||
* Enable mooth scrolling by default | ||||||||
*/ | ||||||||
@media (prefers-reduced-motion: no-preference) { | ||||||||
|
||||||||
:has(:target) { /* include all elements with a target (i.e. html only will not include dialogs) */ | ||||||||
scroll-behavior: smooth; | ||||||||
scroll-padding-top: var(--scroll-padding-default,); /* empty fallback if property doesn't exist */ | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
/* | ||||||||
* Create a root stacking context | ||||||||
*/ | ||||||||
.wp-site-blocks { | ||||||||
isolation: isolate; | ||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ | |
*/ | ||
button:where(:not(.components-button)) { | ||
|
||
/* styles here */ | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ | |
*/ | ||
a:where(:not(.components-external-link)) { | ||
|
||
/* styles here */ | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to enable dark mode by default? We don't usually style for it unless it is a specific requests.
Also I don't think we should have to override our own linting rules in our scaffold.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this enables dark mode by default, just that it allows it to be both dark and light