Bug with STYLE tag inside SVG tag

66 views
Skip to first unread message

Javier Gómez

unread,
May 11, 2014, 6:59:22 PM5/11/14
to gwd...@googlegroups.com
Hi

HTML4 requires the <style> tag to be placed in the <head> section, even though browsers allow <style> tags within the body. HTML5 includes the scoped attribute, which allows you to create style sheets that are scoped within the parent element of the <style> tag. This also enables you to place <style> tags within the <body> element. When I insert a <style> tag inside a <svg> tag, GWD can not open the document and displays the following error: 
⚠ Unable to open file due to the following error: Cannot call method 'replace' of undefined

Example code:

<!DOCTYPE html>
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="300px" height="300px" viewBox="0 0 300 300">
<style scoped>
#Capa_1 .st0{fill:#8C6239;stroke:#000000;stroke-miterlimit:10;}
</style>
<rect x="32" y="22" class="st0" width="88" height="88"/>
</svg>
</body>
</html>



Jason Long

unread,
May 12, 2014, 8:08:24 PM5/12/14
to gwd...@googlegroups.com
Hi Javier

I have filed a bug report for the issue and we'll investigate.  Thank you for reporting the bug.  

Thanks
Jason (GWD team)

Reply all
Reply to author
Forward
0 new messages