Comments (2)
The idea is it works like css.
If you do this itβs perfectly valid, and it could happen as a result of two or more selectors cascading (combining) too β which is your second example.
This is no different than having a css
- {
color:blue
}
a {
color:red
}
(For example)
These are perfectly valid scenarios - especially the second one you gave - and changing it would be a breaking change, causing unexpected errors.
from thymesheet.
I agree that the behaviour makes sense in that it is consistent with CSS, and that changing it will cause unexpected errors.
I checked what errors would occur in our project by hacking Thymesheet to throw some exceptions in the cases I outlined above... and I found quite a few errors when running our project's tests.
Unfortunately perhaps half of these exceptions are thrown because of Thymesheet that is obviously erroneus (especially with the first case, but also sometimes in the second case). It seems pretty common for people to use multiple th:attr
, th:if
or th:classappend
attributes, and expect them to be applied cumulatively.
So, while this behaviour does make sense. I don't think it is ideal because it also results in problems going unnoticed.
from thymesheet.
Related Issues (12)
- Thymesheet equivalent to th:block HOT 1
- Command Line tool which combines Thymesheet with HTML to produce Thymeleaf
- Command Line tool which converts Thymeleaf to Thymesheet
- Support for XML HOT 1
- Externalise Thymesheet includes HOT 1
- HtmlThymesheetLocator should extend the lookup locator
- LookupLocator .properties location should be configurable in Spring
- Cannot target HTML inside conditional comments
- Cannot target inline JavaScript
- Syntax errors should result in exceptions rather than being logged to System.err and otherwise ignored HOT 2
- Feature Request: Allow Sass style syntax 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 thymesheet.