Code Monkey home page Code Monkey logo

Comments (5)

Timvde avatar Timvde commented on September 15, 2024 2

I have been planning to write a tool for managing styles. It handles adding the right namespace by itself. I haven't worked on it recently, though, and if reStyle is an already working extension, I am happy to work with the developer to make my repository work.

The reason why I didn't include an @-moz-document or @namespace in the styles, is because I find it redundant and easy to automate. As far as I know, for userChrome.css, you don't ever need anything other than the given namespace. If this assumption is wrong, I can see the advantage of adding an @-moz-document in every file and I am definitely willing to include it. If the assumption is right, I'm actually more inclined to ask him to just support CSS files without any @-moz-document or @namespace in userChrome.css.

For what it's worth: there is one userContent.css file in this repository, and it actually has the correct @-moz-document tags.

That's just my current point of view, I'm definitely open for discussion.

from userchrome-tweaks.

Madis0 avatar Madis0 commented on September 15, 2024 2

I think one good reason to include the namespace would be an import-based management, like "the new CTR" does.
That way all styles can affect what they need to and at the same time userChrome.css looks clean.

from userchrome-tweaks.

NiklasGollenstede avatar NiklasGollenstede commented on September 15, 2024 2

I recommend the use of @-moz-document rules for styles in the userChrome.css especially in the userContent.css file in almost any case. As far as I was able to find out, the userChrome.css is applied to ~url-prefix(chrome://) by default. There are quite a lot of documents with that prefix (see this style for some examples. Most/many of the styles in this repository actually only need to be applied to the main Firefox window UI, whose URl is chrome://browser/content/browser.xul. applying them to the entire url-prefix(chrome://) is at best a performance burdon, at worst you end up styling elements you didn't intend to. Stuff like that can be hard to track down.

As for namespaces, I still don't know how they behave. reStyle currently just concats styles with different namespace declarations, which should be invalid (I think), but everything still works. reStyle simply takes the XUL namespace as an indicator that the style is not meant for webpages.

from userchrome-tweaks.

Timvde avatar Timvde commented on September 15, 2024 1

That is definitely what I also had in mind (as demonstrated by this parse regex). But as you can see, for userChrome.css tweaks (not userContent.css), Aris also does not include the namespace in the css files. Example.

He also doesn't seem to be using it in his top-level userChrome.css though, so I'm not sure how that works. Is it maybe not necessary at all?

from userchrome-tweaks.

mikhoul avatar mikhoul commented on September 15, 2024 1

@Timvde Maybe you could try to coordinate also with @FirefoxBar to have a more standard format for the CSS files with this xStyle addon too.

I've opened an issue here FirefoxBar/xStyle#38 to have xStyle to support managing and editing of userChrome.css and userContent.css .

Regards :octocat:

from userchrome-tweaks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.