add 2 rules for same property
futurist opened this issue · 7 comments
I've try to add 2 rules for same property like below:
console.log(b.cursor('ns-resize').cursor('-webkit-grab').style)
But result is only last style, is this an issue?
When adding style to drag & drop element, I like the -webkit-grab
cursor style, but for others don't support it, I'd like to fallback to ns-resize
, but cannot get it in one rule, that's why I post this issue.
Ah I see. That makes perfect sense. I'll look into it.
Until then you can define them in separate instances like this :
b.cursor('ns-resize') + b.cursor('-webkit-grab')
That will generate 2 classes but still achieve the desired end result.
About this issue, I'm also facing the flexbox problem:
.page-wrap {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6, BB7 */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Safari 6.1+. iOS 7.1+, BB10 */
display: flex; /* NEW, Spec - Firefox, Chrome, Opera */
}
.main-nav,
.main-sidebar {
-webkit-box-flex: 1; /* OLD - iOS 6-, Safari 3.1-6 */
width: 20%; /* For old syntax, otherwise collapses. */
-webkit-flex: 1; /* Safari 6.1+. iOS 7.1+, BB10 */
-ms-flex: 1; /* IE 10 */
flex: 1; /* NEW, Spec - Firefox, Chrome, Opera */
}
I'm struggled to include above into bss also.
Hi @futurist.. So I did look into it, but got caught up in a small mind game about the last flex-box example you posted. So optimally I'd want bss to handle this behind the scenes. That means I'd want bss to simply take display: flex;
and flex: 1
, and then do the cross-browser support automatically. This is probably something that will take some time to do properly, and your initial use case of doing various cursors would still be present.
So — I'll be introducing support for multiple same named properties (as one expects would be possible), but I'll hold out on documenting it for now until I've thought through a proper solution for seamless cross-browser support..
I've just pushed the changes now, but I'll hold on with a new release until I've done some more testing.
Would you mind trying out how it works for you with the latest commit?
Yes, the lastest commit allow same property repeation, thanks!