Comments (2)
Aha!
I wrote a new less file like this:
#gradient {
.horizontal(@startColor: #555, @endColor: #333) {
.gradient(linear-gradient(left, @startColor, @endColor));
}
.vertical(@startColor: #555, @endColor: #333) {
.gradient(linear-gradient(top, @startColor, @endColor));
}
.directional(@startColor: #555, @endColor: #333, @deg: 45deg) {
.gradient(linear-gradient(@deg, @startColor, @endColor));
}
.radial(@innerColor: #555, @outerColor: #333) {
.gradient(radial-gradient(circle, @innerColor, @outerColor));
}
}
the namespace came from Bootstrap
from lesshat.
It looks better indeed !
I'm not a huge fan of the namespace thing, I think it's harder to write and doesn't add real value... but it's ok.
The actual thing that was annoying me in Bootstrap is that their mixin was outputting background
property instead of simply background-image
, which was sometimes overriding other properties like background-color
.
I was just wondering where does the .gradient()
mixin come from ? I thought it was .background-image()
.
Thanks.
from lesshat.
Related Issues (20)
- Developer mode HOT 1
- sticky position mixin HOT 1
- Extend "placeholder" mixin
- Keyframes breaks Safari 10.11 and iOS9 beta HOT 4
- support clip-path
- Support for rhythm baseline
- Has support for lesshat stopped? HOT 3
- Future of Less Hat HOT 3
- Add changelog HOT 1
- Incorrect keyframes syntax breaks Safari9's CSS parser HOT 20
- .keyframes-mixin and Safari HOT 2
- Safari ignore css HOT 1
- The -ms radial gradient doesn't works with percents
- border radius actually generated background-clip property
- v3.0.3 breaking changes HOT 7
- removal of build folder from master HOT 3
- Download url https://raw.githubusercontent.com/csshat/lesshat/master/build/lesshat.less is invalid HOT 5
- how to import in vue.js HOT 1
- Atom - Less Autocompile
- Display grid support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lesshat.