Page 1 of 1

How to switch on SVG specific CSS attributes / properties

Posted: Mon Oct 13, 2014 1:36 am
by MikeGale
I'm currently re-investigating using SVG on pages. (For example http://commons.wikimedia.org/wiki/Categ ... _the_world, which is a public domain world map.)

When validating with version 14.05, some attributes / properties are not recognised. For example fill-opacity, stroke, stroke-opacity, stroke-width, stroke-miterlimit, stroke-dasharray give "The <> property is not a recognized style property. Is it misspelled?"

The properties exist and are found in SVG Presentation (0964) (except for stroke-dasharray, though I do see a stroke-dasharr).

How do I switch on the attribute group?

Re: How to switch on SVG specific CSS attributes / propertie

Posted: Mon Oct 13, 2014 8:18 am
by Albert Wiersch
Hi Mike,

You can make sure SVG is active by using the Configuration Editor (Ctrl+F5) and going to the Categories tab. Make sure "SVG (0049)" is in the active categories. If it's not, double click on it in the list on the left to move it to the active categories list on the right.

If this doesn't work then please email me some sample documents and I'll see what's happening.

Re: How to switch on SVG specific CSS attributes / propertie

Posted: Mon Oct 13, 2014 4:06 pm
by MikeGale
Yep SVG is active, in Categories.

(After looking through configuration I decided to ask the question rather than attempt to edit it.)

I reproduced the problem using the SVG at http://upload.wikimedia.org/wikipedia/c ... ngular.svg

I embedded this directly in a page, made a few small changes then tested.

I delivered this page as application/xhtml+xml, for testing. (I've tested other similar pages as polyglot, with several other modifications (including moving the styling out of the SVG block)... all exhibit the same issue.)

The CSE generated HTML5 page initially failed with the quotes around the version value being rejected by browsers. '<?xml version=”1.0” encoding="UTF-8"?>' When I changed that to standard double quotes it worked. (EDIT: This was generated from the XHTML5.txt template.)

All tests have so far been on Win 8.1, 64bit, patched up to date.

The page is getting on for 2 megs so I zipped it and emailed it to you.

Thanks.

Re: How to switch on SVG specific CSS attributes / propertie

Posted: Mon Oct 13, 2014 7:08 pm
by Albert Wiersch
Mike,

Thanks. Got it.

I see what you're referring to now. CSE HTML Validator doesn't currently have much support for SVG style properties but I will improve the support for them and get back to you when I have a version ready for testing.

Re: How to switch on SVG specific CSS attributes / propertie

Posted: Mon Oct 13, 2014 7:49 pm
by MikeGale
Thanks Albert.

I found the properties already in the configuration so I assumed.

Re: How to switch on SVG specific CSS attributes / propertie

Posted: Tue Oct 14, 2014 2:38 pm
by Albert Wiersch
Hi Mike,

I am emailing you a new BETA to try. Please let me know how it works.

Re: How to switch on SVG specific CSS attributes / propertie

Posted: Tue Oct 14, 2014 5:23 pm
by MikeGale
Hi Albert.

Beta installed and initial tests run.

Looks good. Accepted all the SVG specific CSS properties used in that page.

Re: How to switch on SVG specific CSS attributes / propertie

Posted: Tue Oct 14, 2014 5:31 pm
by Albert Wiersch
Great... if you run across anything else, then please let me know.

By the way, CSE HTML Validator checks some of those SVG property values but not all. I can add such checking later if it becomes an issue but I don't think many people are using them or writing their own SVG. The main thing is that it doesn't generate those errors anymore for valid SVG style properties. :D