Comments (9)
@bartosz-zawada "html :AttributeMerger" was added earlier and this was made for support this feature https://github.com/judofyr/temple/blob/master/lib/temple/html/attribute_merger.rb
For your case I think it would be better and cleaner to write this:
- class_name = 'ruby'
div class = "hello #{ class_name }" Hello Ruby!
So that case class is defined only in one place.
Btw, I think it would be better to create github organization("skim" for example) though because otherwise there will many forks and nobody will support this in actual state.
from skim.
I'm getting the same error using code like this:
button.btn class=('active' if @active)
I suppose it's not a new feature 😄
from skim.
@amenzhinsky why not just to use this code:
button class = "btn #{ 'active' if @active }"
from skim.
Using class name after dot and with class
directive simultaneously is confusing. I think it would be better to use it either with dot or with class
directive only.
from skim.
@gkopylov I do understand in some cases it's confusing, but in examples like I posted above it would be nice to have. Maybe you're right 👍
from skim.
It's unfortunate because
.staticClass class=@dynamicClassName
is valid slim. Why deviate?
from skim.
I agree with @alubbe
We should maintain compatibility with slim because the main reason people use this gem is that they want to use slim for JS templating.
from skim.
I agree with @bartosz-zawada that we shouldn't use "html :AttributeMerger". Could you make a pull request with it?
from skim.
Any progress on merging @pavelkomiagin's PR?
from skim.
Related Issues (20)
- ExecJS::RuntimeError - SyntaxError: unexpected LOGIC HOT 5
- Optimization on browsers HOT 12
- Still being maintained? HOT 14
- Uncaught ReferenceError: variable is not defined HOT 2
- Not working HOT 3
- How to iterarate json object? HOT 2
- rails 4.2 and slim-rails
- How to use regex expression in control logic? HOT 1
- Uncaught ReferenceError: JST is not defined HOT 2
- Compile to html for use with Riot.js HOT 7
- default_options has been deprecated, use options
- Iterating and working with collections HOT 1
- Templates do not compile HOT 1
- publish latest version with cli too please HOT 1
- Sprockets register_engine deprecated HOT 4
- Possible global scope issue? HOT 2
- `unexpected &` error HOT 5
- Uncaught ReferenceError: JST is not defined HOT 3
- Rails 6 configuration HOT 1
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 skim.