How to switch on SVG specific CSS attributes / properties

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
Posts: 711
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

How to switch on SVG specific CSS attributes / properties

Post by MikeGale » Mon Oct 13, 2014 1:36 am

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?

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3446
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

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

Post by Albert Wiersch » Mon Oct 13, 2014 8:18 am

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.
Image
Albert Wiersch

User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
Posts: 711
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

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

Post by MikeGale » Mon Oct 13, 2014 4:06 pm

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.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3446
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

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

Post by Albert Wiersch » Mon Oct 13, 2014 7:08 pm

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.
Image
Albert Wiersch

User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
Posts: 711
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

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

Post by MikeGale » Mon Oct 13, 2014 7:49 pm

Thanks Albert.

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

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3446
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

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

Post by Albert Wiersch » Tue Oct 14, 2014 2:38 pm

Hi Mike,

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

User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
Posts: 711
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

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

Post by MikeGale » Tue Oct 14, 2014 5:23 pm

Hi Albert.

Beta installed and initial tests run.

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

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3446
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

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

Post by Albert Wiersch » Tue Oct 14, 2014 5:31 pm

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
Image
Albert Wiersch

Post Reply