Skip to content

Commit

Permalink
build: use postcss-nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
JaZo committed Feb 9, 2024
1 parent 020f596 commit 8064a11
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 30 deletions.
51 changes: 50 additions & 1 deletion package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"devDependencies": {
"cssnano": "^6.0.1",
"postcss": "^8.4.31",
"postcss-cli": "^10.1.0"
"postcss-cli": "^10.1.0",
"postcss-nesting": "^12.0.2"
}
}
1 change: 1 addition & 0 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
plugins: {
'postcss-nesting': {},
cssnano: {},
},
}
53 changes: 26 additions & 27 deletions resources/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,40 @@
background-size: cover;
position: relative;
z-index: 0;
}

.fi-simple-layout::before {
background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0) 25%) no-repeat;
background-size: cover;
content: var(--filament-backgrounds-attribution-backdrop);
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;
}
&::before {
background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0) 25%) no-repeat;
background-size: cover;
content: var(--filament-backgrounds-attribution-backdrop);
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;
}

.fi-simple-layout::after {
bottom: 2rem;
color: white;
content: var(--filament-backgrounds-attribution);
left: 2rem;
position: absolute;
text-shadow: 0 0 3px black;
&::after {
bottom: 2rem;
color: white;
content: var(--filament-backgrounds-attribution);
left: 2rem;
position: absolute;
text-shadow: 0 0 3px black;
}
}

/* N.B. This selector has to be more specific for dark mode compatibility */
.fi-simple-main.fi-simple-main.fi-simple-main {
position: relative;
--tw-bg-opacity: 0.9;
--tw-ring-color: transparent;
}

/* N.B. This selector has to be more specific for dark mode compatibility */
.fi-simple-main.fi-simple-main.fi-simple-main::before {
content: '';
position: absolute;
inset: 0;
z-index: -1;
border-radius: inherit;
backdrop-filter: blur(3px);
&::before {
content: '';
position: absolute;
inset: 0;
z-index: -1;
border-radius: inherit;
backdrop-filter: blur(3px);
}
}
2 changes: 1 addition & 1 deletion resources/dist/filament-backgrounds.css

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

0 comments on commit 8064a11

Please sign in to comment.