Gettting error while declaring non-global style

There were problems with the following fields:

Style code has an error - parse error on value "@namespace " (NAMESPACE_SYM) on line 1 around "com/") {
@namespace url(http:/". If you need help, post a new discussion at https://forum.userstyles.org/post/discussion/5

So when I write my style on on my system it runs perfect, but when I export it with a particular website speicified, it shows this error.

I'm still learning , can you help me out?

The first 3 lines I'm including below:

@-moz-document url-prefix("MY WEBSITE NAME GOES HERE") {
@namespace url(http://www.w3.org/1999/xhtml);
@namespace svg url(http://www.w3.org/2000/svg);

Comments

  • @namespace is a global (top level) symbol, it can't be inside a block, see the spec:

    Any @namespace rules must follow all @charset and @import rules and precede all other non-ignored at-rules and style rules in a style sheet

  • wOxxOm said:

    @namespace is a global (top level) symbol, it can't be inside a block, see the spec:

    Any @namespace rules must follow all @charset and @import rules and precede all other non-ignored at-rules and style rules in a style sheet



    hey thanks for clarifying that! Could you please suggest a workaround that?
    Should I rather include the `@-moz-document url-prefix` line under the @namespace line?



Sign In or Register to comment.