Created
December 18, 2020 21:39
-
-
Save pankajpatel/566cdc42022ee64511959172700c6d27 to your computer and use it in GitHub Desktop.
From Storybook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--grid-size: 10px; | |
--cell-amount: 10; | |
--grid-line-opacity: .4; | |
--grid-offset-x: 20px; | |
--grid-offset-y: 20px; | |
} | |
.with-grid-lines { | |
background-size: calc(var(--grid-size) * var(--cell-amount)) calc(var(--grid-size) * var(--cell-amount)), | |
calc(var(--grid-size) * var(--cell-amount)) calc(var(--grid-size) * var(--cell-amount)), | |
var(--grid-size) var(--grid-size), | |
var(--grid-size) var(--grid-size) !important; | |
background-position: var(--grid-offset-x) var(--grid-offset-y), | |
var(--grid-offset-x) var(--grid-offset-y), | |
var(--grid-offset-x) var(--grid-offset-y), | |
var(--grid-offset-x) var(--grid-offset-y) !important; | |
background-blend-mode: difference !important; | |
background-image: linear-gradient(rgba(130, 130, 130, var(--grid-line-opacity)) 1px, transparent 1px), | |
linear-gradient(90deg, rgba(130, 130, 130, var(--grid-line-opacity)) 1px, transparent 1px), | |
linear-gradient(rgba(130, 130, 130, calc(var(--grid-line-opacity) / 2)) 1px, transparent 1px), | |
linear-gradient(90deg, rgba(130, 130, 130, calc(var(--grid-line-opacity) / 2)) 1px, transparent 1px) !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment