bkwld / stylus-library Goto Github PK
View Code? Open in Web Editor NEWStylus utility mixins
License: MIT License
Stylus utility mixins
License: MIT License
fluid(top, 5%, 15%, max-break: desktop, min-break: tablet)
will just render in px
instead of %
.
The same case might goes for other units as well but I have not fully inspect them.
Does this:
display flex
align-items center
justify-content center
Didn't see this off-hand, but I'm using this in 1 place, which feels right for a shorthand:
absolute-fill
position: absolute
top 0
left 0
width 100%
height 100%
Thus, no Modernizr dependency!
So like rotate: 90deg
== transform: rotate(90deg)
May be a pretty niche use case, but was trying to override an external style to match the rest of the site. External style was applied with element.style
and so we needed to use the !important
flag to override it.
The 'fluid' mixin breaks when you don't pass in a default value for max-break. Following the example provided I'm using fluid font-size, 72, 32
and seeing the following error:
TypeError: expected "unit" to be a unit, but got ident:max-w
Say you have this jade:
.card.blue
h1 hey there
And you want to define a hover like this:
.card
h1
font-size 24px
&.green
h1
color green
&.blue
h1
color blue
Well, a cleaner way is to use ranges:
.card
h1
font-size 24px
^[0].blue ^[1..-1]
color blue
^[0].green ^[1..-1]
color green
Here's the codepen of that.
This ticket is to make a function or something that makes the ^[0].blue ^[1..-1]
bit easier to digest. Like maybe you it's like
+whenRootHas(.blue)
color blue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.