Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
CSS In Pure Nim .tar.gz | 2023-05-24 | 293.2 kB | |
CSS In Pure Nim source code.tar.gz | 2023-05-24 | 293.2 kB | |
CSS In Pure Nim source code.zip | 2023-05-24 | 317.3 kB | |
CSS In Pure Nim.zip | 2023-05-24 | 317.3 kB | |
README.md | 2023-05-24 | 1.1 kB | |
Totals: 5 Items | 1.2 MB | 0 |
You can use CSS in pure Nim now 🍍
Here is example
:::nim
var myCss = buildStyle:
# Translates into @import url(...)
import url("path/to/font")
# Translates into .myClass
class myClass:
color: {{nimVariable}}
background-color: {{otherNimVariable}}
# Translates into #myId
id myId:
color: red
# Translates into body
tag body:
color: white
background: rgb(33, 33, 33)
# Translates into @keyframes
@keyframes animation:
0: # translates into 0%
opacity: 0
tranform: translateX(-150.px)
100: # translates into 100%
opacity: 1
transform: translateX(0.px)
# Translates into @media ...
@media screen and (min-width: 900.px):
tag article:
padding: 1.rem 3.rem
# Translates into button:hover
button@hover:
color: red
@supports (display: flex):
@media screen and (min-width: 900.px):
tag article:
display: flex