Skip to content

Commit

Permalink
style(libs/ui): add c-backdrop component
Browse files Browse the repository at this point in the history
  • Loading branch information
vnphanquang committed Apr 10, 2024
1 parent 1f61fbc commit 59f78c7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-beers-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltevietnam/ui': minor
---

add `c-backdrop` CSS component
23 changes: 23 additions & 0 deletions libs/ui/src/css/core/components/c-backdrop.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.c-backdrop {
position: relative;
backdrop-filter: blur(8px);

&::before {
content: '';

position: absolute;
inset: 0;

width: 100%;
height: 100%;

opacity: 0.9;
background: theme('colors.bg.100');
}

&:not(.c-backdrop--static) {
position: absolute;
z-index: -1;
inset: 0;
}
}
1 change: 1 addition & 0 deletions libs/ui/src/css/core/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default [
require('./c-splash.css'),
require('./__wireframe__.css'),
require('./c-avatar.css'),
require('./c-backdrop.css'),
require('./c-btn.css'),
require('./c-callout.css'),
require('./c-input.css'),
Expand Down

0 comments on commit 59f78c7

Please sign in to comment.