-
-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fine grained CSS support #2969
Fine grained CSS support #2969
Conversation
9efe2f6
to
251b8e9
Compare
da0f33b
to
437b423
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really nice feature!!
Would you mind please adding a changelog entry so that we keep the release ready?
e3334fe
to
70e138c
Compare
This gives us the ability to style individual parts of an item specifically.
It's more related to how stuff is named in the HTML world.
Instead, calculate it only when requested.
70e138c
to
0a08673
Compare
@danyeaw I added a change log entry. I'm not really happy with how pseudo styles and inherited styles are calculated (with the "private" BTW. My long term (ultimate) goal is to get rid of the inline styles we use a lot currently, because they cannot be overridden. |
It's causing trouble with nested elements, attributes and such.
Thanks @amolenaar! |
It needs a little work to fix the linting errors introduced by this PR. Linting was less strict before #2979 was merged. |
PR Type
What kind of change does this PR introduce?
What is the current behavior?
CSS can only be applied to elements (class, association). We can not write CSS that target specific parts in the element, e.g. attributes shown in a Class.
Issue Number: #2919, #3023
What is the new behavior?
CssNode
. With this shape we can tell Gaphor to update the style sheet for a specific element, such as an attribute owned by a class.::after
pseudo-element. This allows us to create custom tags (e.g.{abstract}
to make it more clear a class/operation is abstract).Does this PR introduce a breaking change?
Other information
There's still some work ahead:
CssNode
s for all elements that makes sense..compartment
. I think this makes more sense that referring to it as an element.!! NB. The caching is still a bit flaky. I disabled caching for now, but that may result in a lot more style computations.