Change appearence for read-only content by css
Post here questions and problems related to oXygen frameworks/document types.
Change appearence for read-only content by css
Hi,
I have a css rule that adds for specific elements a button next to it that will open a dialog for editing the content:
When the content is not editable the button makes no sense and I'd like to hide it. Is there a simple and universal way to do this? Something like:
Thanks and regards,
Patrik
I have a css rule that adds for specific elements a button next to it that will open a dialog for editing the content:
Code: Select all
MyElement:after(8) {
content:oxy_editor(...);
}
Code: Select all
MyElement:is-read-only:after(8) {
content: ""; /* hide button in read-only content */
}
Patrik
-
- Posts: 1008
- Joined: Wed Nov 16, 2005 11:11 am
Re: Change appearence for read-only content by css
Post by alex_jitianu »
Hi Patrik,
Even though the button appears inside these read-only areas, it is disabled, right? How are these areas marked as read-only? Through CSS rules or just by the fact that they are the expanded content of a reference? In the first case you could set content: "" in the same CSS rule that marks the element as read-only. In the second case you can make use of another pseudo class that we set on expanded references:
Best regards,
Alex
Even though the button appears inside these read-only areas, it is disabled, right? How are these areas marked as read-only? Through CSS rules or just by the fact that they are the expanded content of a reference? In the first case you could set content: "" in the same CSS rule that marks the element as read-only. In the second case you can make use of another pseudo class that we set on expanded references:
Code: Select all
*:-oxy-referenced-content MyElement:is-read-only:after(8) {
content: ""; /* hide button in referenced content */
}
Best regards,
Alex
Re: Change appearence for read-only content by css
Hi Alex,
the button is disabled but since it consists only of a single "*" without a frame it doesn't look different from an enabled one...
Additional situations are that I've set an ancestor element to read-only, but I can handle these explicitly as well.
The more important use-case is the one with references, and here your solution works. So I'm fine: :)
Thanks!
Patrik
the button is disabled but since it consists only of a single "*" without a frame it doesn't look different from an enabled one...
Additional situations are that I've set an ancestor element to read-only, but I can handle these explicitly as well.
The more important use-case is the one with references, and here your solution works. So I'm fine: :)
Thanks!
Patrik
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service