ULB-Darmstadt / shacl-form

HTML5 web component for editing/viewing RDF data that conform to SHACL shapes
https://ulb-darmstadt.github.io/shacl-form/
MIT License
28 stars 5 forks source link

define a CSS class from the shacl form #10

Closed thhck closed 6 months ago

thhck commented 7 months ago

This allow to give a particular CSS class to a specific element of the form by defining a new cssClass in the shacl file.

s-tittel commented 7 months ago

Hi, I understand the need for having a means to style elements in the form. Unfortunately, SHACL isn't meant for that and I would rather not invent something in the SHACL namespace that is not conforming to the spec. I updated your branch, so that this term is being used instead: https://www.w3.org/TR/annotation-vocab/#styleclass . Again, if you create a new PR, I will merge :-)

This is still not really clean since the term is defined to be valid on a different subject class that we deal with, but I couldn't find something better.

Also note that I apply the css class to the shacl-property html element (not the "add" button). You would need to update your style selector accordingly.

thhck commented 6 months ago

Again, if you create a new PR, I will merge :-)

Done,

his is still not really clean since the term is defined to be valid on a different subject class that we deal with, but I couldn't find something better.

If you think is not clean enough solution to be merged, I'm also fine not merging it and see if we can find a better solutoin