Styling xincluded inline elements with css
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Styling xincluded inline elements with css
Hi there,
I was inspired by something in this thread, http://www.oxygenxml.com/forum/topic3240.html, to try to change the styling of xincluded content. I can see that oxy|reference also applies to xinclude, but nothing I try affects the include element itself. My goal is to make xincluded inlines less obtrusive (in my customization of DocBook, you can xinclude any element, including inlines).
I was trying things like this and could get it to style the oxy|reference but not the include:
Any tips?
Thanks,
David
I was inspired by something in this thread, http://www.oxygenxml.com/forum/topic3240.html, to try to change the styling of xincluded content. I can see that oxy|reference also applies to xinclude, but nothing I try affects the include element itself. My goal is to make xincluded inlines less obtrusive (in my customization of DocBook, you can xinclude any element, including inlines).
I was trying things like this and could get it to style the oxy|reference but not the include:
Code: Select all
@namespace oxy url('http://www.oxygenxml.com/extensions/author');
@namespace xi url('http://www.w3.org/2001/XInclude"');
oxy|reference, xi|include {
display:inline !important;
}
oxy|reference:before, xi|include:before {
display: inline !important;
}
Thanks,
David
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Styling xincluded inline elements with css
Hi David,
Are you looking for a CSS selector like this?
Regards,
Radu
Are you looking for a CSS selector like this?
Code: Select all
/*a <sect1> which is a direct child of an <xi:include> which is a direct child of the root <article>*/
article > xi|include > sect1:before{
display:inline;
}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Styling xincluded inline elements with css
Actually, I figured out I just need to leave off the namespace prefix:
That prevents the include element itself from being rendered as a block element, which gets me part of the way there. Is there a way to suppress the link icon and the value of the href attribute? I tried adding to the rule but that doesn't help.
Doing the following:
gets rid of the other icon, but it's not so obtrusive. In fact, I'd like to keep it and get rid of the link icon and value of the href attribute.
David
Code: Select all
include {
display:inline !important;
}
Code: Select all
content: "" !important
Doing the following:
Code: Select all
oxy|reference:before {
content: "" !important;
}
David
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Styling xincluded inline elements with css
Hi David,
This CSS snippet should get you there:
Regards,
Radu
This CSS snippet should get you there:
Code: Select all
@namespace xi "http://www.w3.org/2001/XInclude";
@namespace oxy url('http://www.oxygenxml.com/extensions/author');
xi|include:before {
content:"" !important;
}
oxy|reference:before {
content: "" !important;
}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Styling xincluded inline elements with css
Yes, that did it. I guess the "url()" part kept the xi from being recognized? Anyway, below is what I ended up with (I've modified DocBook to allow xincludes anywhere, so I want included content in paras, entrys and titles, to be inline and less obtrusive. I've kept the little icon before the oxy|reference because it's unobtrusive and mousing over it shows the path to the included content:
Thanks,
David
Code: Select all
@namespace xi "http://www.w3.org/2001/XInclude";
para xi|include, entry xi|include, title xi|include {
display:inline !important;
}
para xi|include:before, entry xi|include:before, title xi|include:before {
content:"" !important;
}
David
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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