Skip to content

Commit

Permalink
fix: stop hiding undefined custom elements to avoid layout shifts
Browse files Browse the repository at this point in the history
  • Loading branch information
naiyerasif committed Aug 25, 2023
1 parent a8772f4 commit f8a5da8
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 295 deletions.
5 changes: 3 additions & 2 deletions dist/preset.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Preset v1.0.0 | MIT License | https://github.com/Microflash/preset */
/*! Preset v1.0.1 | MIT License | https://github.com/Microflash/preset */
* {
margin: 0;
line-height: calc(0.3rem + 2ex + 0.3rem);
Expand All @@ -13,6 +13,7 @@
:where(html) {
height: 100%;
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
Expand All @@ -34,7 +35,7 @@ body {
tab-size: var(--preset-tab-size, 2);
}

:where(:not(:defined), [hidden]) {
:where([hidden]) {
display: none;
}

Expand Down
4 changes: 2 additions & 2 deletions dist/preset.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microflash/preset",
"version": "1.0.0",
"version": "1.0.1",
"description": "A modern CSS preset",
"keywords": [
"css",
Expand All @@ -27,10 +27,10 @@
},
"devDependencies": {
"csso-cli": "^4.0.2",
"postcss": "^8.4.27",
"postcss": "^8.4.28",
"postcss-cli": "^10.1.0",
"postcss-preset-env": "^9.1.0",
"sass": "^1.64.1"
"postcss-preset-env": "^9.1.1",
"sass": "^1.66.1"
},
"browserslist": [
"defaults, not IE > 0"
Expand Down
Loading

0 comments on commit f8a5da8

Please sign in to comment.