mojotech / jeet

The most advanced, yet intuitive, grid system available for Sass or Stylus
http://jeet.gs
MIT License
2.99k stars 260 forks source link

Jeet 6.1.4 adds "j-" prefix, breaking CSS. #491

Closed petethompson closed 8 years ago

petethompson commented 8 years ago

Using Jeet 6.1.4, Any time I have the following in my stylus code:

.element text-align center

It's compiled to:

.element { text-align: j-center; }

loque commented 8 years ago

Same here using stylus@0.54.5

jemware commented 8 years ago

+1

ingridoberbuchler commented 8 years ago

+1

hlotvonen commented 8 years ago

+1

noxidsoft commented 8 years ago

+1

A work around for now might be an implicit...

width 20em
margin-left auto
margin-right auto

Width can be anything that helps you fit into the space in question. Hope this is fixed soon. I wonder where it is in the code.

After a peek, it's something to do with the aliases.

matthewsimo commented 8 years ago

A temporary work around is to overwrite the center mixin for that file scope, if have the flexibility to do that... i.e.

.example
  text-align: center // outputs 'j-center'

vs.

center()
  text-align: center

.example
  center() // outputs 'text-align: center'
ghost commented 8 years ago

Another workaround will be to remove the common css property values from aliases.styl

https://github.com/mojotech/jeet/blob/master/stylus/jeet/aliases.styl

while the alias shortcuts should just use the correct j-* mixin instead...

But this would require you to fork/edit jeet's codebase.

Leolik commented 8 years ago

confirm "j-" added for center (text-align, align-items, justify-content) and column (flex-direction), and maybe others

noxidsoft commented 8 years ago

center() text-align: center

.example center() // outputs 'text-align: center'

@matthewsimo in retrospect this is fine, however in an existing template (think third-party) the center() is already hi-jacked, and applying this fix, while it works, also messes with a bunch of other elements.

matthewsimo commented 8 years ago

@noxidsoft This is not a permanent solution, nor did I suggest it as such (note my use of "temporary"). It's a temp work around while the jeet team work on not hijacking CSS keywords - I even mentioned the bit about file scope...

noxidsoft commented 8 years ago

@matthewsimo My apologies, I wasn't insinuating anything, Jeet team is doing a great job, love the software. I was pointing out that others tend to hi-jack the library defaults etc. Sorry, my newbie-ness probably getting in the way for Stylus/Jeet semantics, lol. I've updated my last comment.

chogarcia commented 8 years ago

+1

alex-shamshurin commented 8 years ago

What's the f... ? One brunch does not work correctly with imports, another with j prefix.. How to use it?

pixeldesu commented 8 years ago

I just now went ahead and re-released 6.1.2 as 6.1.5 (since I can't unpublish old releases on NPM), everything should work as expected again!

Please comment on this issue if it happens to be otherwise. I deprecated both 6.1.3 and 6.1.4