I am trying to make it so that some passages will have a border around them and others will not. I have tried to use <<addclass>> to add a border to certain passages, but since the border css is held in ".passage .content" I'm unsure how to use it. If it were "body.content" for example it would be <<addclass "body" "content">> but that doesn't work with ".passage" it just gives the error "no element matched the selector ".passage""
I also tried using <<addtag>> instead to the passages I want to have a border, using [data-tags~=tag] but when I use <<toggletag>> on the passages I don't want to have the border, all of the text is removed as well and only a solid black background is shown.
My stylesheet for the border looks like this:
.passage .content{
box-sizing: border-box;
-moz-box-sizing: border-box;
top: 500px;
width:100%;
vertical-align: center;
border:
#fff double 0.4em;
border-radius: 1em;
padding: 1em;
}
Should I be using something else instead of addclass or addtag, or am I just using them incorrectly? I am very new to this. Thanks
Comments
All you should need to do is to tag the passages—in the passage editor—where you want your border to show up with an appropriately descriptive tag (e.g. bordered). Then use a selector something like the following:
PS: Put vendor prefixed properties before the standard ones. In other words: