Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.0.1-incubating-core-SNAPSHOT
-
None
Description
Add @import support to the skinning's css file. It should behave exactly the same as the include support that we have in the XSS files.
Here are some code snippets where the import happens.
See StyleSheetDocumentParser.java
-An included xss file is parsed in _handleImports and stored as a StyleSheetDocument in "_imports" that is an Arraylist of elements of type StyleSheetDocument.
// Handle an import - parse the imported XSS document
private void _handleImport(
ParseContext context,
String href
) throws SAXParseException, IOException
{
if (href == null)
// Now, parse the imported document
StyleSheetDocument doc = null;
try
{ doc = (StyleSheetDocument)XMLUtils.parseInclude(context, href, StyleSheetDocument.class); }catch (SAXException e)
{ _LOG.severe(e); }if (doc != null)
{ if (_imports == null) _imports = new ArrayList<StyleSheetDocument>(); _imports.add(doc); }}
And also this:
// Return all style sheet nodes - this includes imported style sheets
// as well as style sheets from this document. Imported style
// sheets have lower precedence - they come first.
private StyleSheetNode[] _getStyleSheets()
...