acrisci / superUserContent

Dynamically load stylesheets in Firefox from plaintext files in your profile
Mozilla Public License 2.0
9 stars 0 forks source link

Could you please provide an example? #1

Open phayz opened 10 years ago

phayz commented 10 years ago

Please provide a practical example of what can be achieved with superUserContent. I absolutely love the idea and implementation.

acrisci commented 10 years ago

Hi, thanks for your feedback.

I have not gotten much feedback on this project and I think the lack of documentation and examples may be the cause. I think I will do a blog post on this soon that will provide some detailed use cases and examples.

The point of the add-on is to be a general tool that can be used for many things. I personally use it to correct mistakes in the webpages I visit frequently. A good example from my shame.css file is some modifications I make to a documentation wiki I visit a lot:

@-moz-document url-prefix("https://developer.gnome.org") {
    #container {
        width: 70%;
    }

    div.content {
        width: 100% !important;
    }

    pre {
        font-size: 10px !important;
        white-space: pre-wrap;
    }
}

This makes the website look better with different screen sizes for my multi-monitor setup.

Another good page can be found on the Firefox tweaks section of the ArchWiki.

If you think of any other good uses for the add-on or you want to help with documentation, please let me know.

I'll post a link to the blog post when I get a chance to write it.

phayz commented 10 years ago

Thank you for your reply. It's funny that you refer me to the ArchWiki as it was at that page that I discovered your add-on. :D The examples given on the ArchWiki are very useful. I guess I got a little confused between the text pointing me to this extension, then providing examples of tweaking the userContent.css file.

I agree that some documentation would help get people started. As for getting more users, I would love to see this extension featured on the Firefox Add-ons home page.

Can you please explain how this extension essentially differs from specifying custom CSS via ~/.mozilla/firefox//chrome/userContent.css, and how it compares with something like the Stylish addon? I don't want to start an addon war, but just want to understand how superUserContent compares with Stylish on a technical level.

acrisci commented 10 years ago

Can you please explain how this extension essentially differs from specifying custom CSS via ~/.mozilla/firefox//chrome/userContent.css, and how it compares with something like the Stylish addon?

What I wanted from this extension was:

1) an easy way to correct mistakes and remove "stupid stuff" from websites I visit 2) apply and correct mistakes in themes from userstyles.org

This can be done with chrome/userContent.css in your Firefox profile, except for this bug which requires you to restart the browser anytime you make changes to the file for the changes to take effect. I looked at the Firefox source code and found that userContent.css is heavily cached so fixing the bug would require big changes that I don't have the clout within Mozilla to make.

Stylish makes this possible, but they made some design choices that make things difficult for people who prefer Unix engineering principles.

Stylish does not store themes as plain text files, but rather the stylesheets are stored within a relational database. This sort of abstraction of the filesystem is common practice among Windows engineers, but makes things difficult for people who prefer their own text editor and command-line tools. Making changes to the stylesheets ties you to Stylish's own implementation of a text editor or their database, which makes working with themes difficult for a Linux user.

superUserContent exposes these stylesheets as plaintext files, which is more familiar to someone used to the Unix concepts of "less is more" and "everything is a file" using the Xorg-style "conf.d" concept for modular configuration.

This allows me to replace Stylish with a much lighter add-on (only 59 source lines of code) that I can use easily with Vim.

I agree that some documentation would help get people started. As for getting more users, I would love to see this extension featured on the Firefox Add-ons home page.

I am not very good at promoting things. If you would like to help promote the project, that would be much appreciated. I would like to see more simple tools like this available for Linux people.

phayz commented 10 years ago

Tony,

Apologies. I intended to reply to your email soon after I received it... but I forgot. :(

Your explanation was detailed and made perfect sense. I can now understand the difference between superUserContent and, for example, Stylish.

I will do my best to promote superUserContent as I think it makes a fantastic addition to Firefox.

On 27 May 2014 12:00, Tony Crisci notifications@github.com wrote:

Can you please explain how this extension essentially differs from specifying custom CSS via ~/.mozilla/firefox//chrome/userContent.css, and how it compares with something like the Stylish addon?

What I wanted from this extension was:

1) an easy way to correct mistakes and remove "stupid stuff" from websites I visit 2) apply and correct mistakes in themes from userstyles.org

This can be done with chrome/userContent.css in your Firefox profile, except for this bug https://bugzilla.mozilla.org/show_bug.cgi?id=208641 which requires you to restart the browser anytime you make changes to the file for the changes to take effect. I looked at the Firefox source code and found that userContent.css is heavily cached so fixing the bug would require big changes that I don't have the clout within Mozilla to make.

Stylish makes this possible, but they made some design choices that make things difficult for people who prefer Unix engineering principles.

Stylish does not store themes as plain text files, but rather the stylesheets are stored within a relational database. This sort of abstraction of the filesystem is common practice among Windows engineers, but makes things difficult for people who prefer their own text editor and command-line tools. Making changes to the stylesheets ties you to Stylish's own implementation of a text editor or their database, which makes working with themes difficult for a Linux user.

superUserContent exposes these stylesheets as plaintext files, which is more familiar to someone used to the Unix concepts of "less is more" and "everything is a file" using the Xorg-style "conf.d" concept for modular configuration.

This allows me to replace Stylish with a much lighter add-on (only 59 source lines of code) that I can use easily with Vim.

I agree that some documentation would help get people started. As for getting more users, I would love to see this extension featured on the Firefox Add-ons home page.

I am not very good at promoting things. If you would like to help promote the project, that would be much appreciated. I would like to see more simple tools like this available for Linux people.

Reply to this email directly or view it on GitHub https://github.com/acrisci/superUserContent/issues/1#issuecomment-44229190 .

phayz commented 10 years ago

Tony,

I know it's been a long time since I last wrote, but I have a question. I recently determined a global stylesheet (CSS) for use in Chrome/Chromium and am quite pleased with the result. However I want to achieve the same result with Firefox and superUserContent.

My problem is that I can't work out how to have the CSS apply to all web sites. I have searched and found that the CSS should apply to all sites if I specify the first line in the CSS as follows:

@-moz-document url-prefix() {

I am not even able to get it working for one specific site.

I'm not sure where I might have gone wrong, and hope you can help. I went into my profile directory and created the directory "userContent.css.d" and put the stylesheet into that directory, then refreshed the page(s) but it has had no effect.

On 3 June 2014 08:54, Russell Dickenson russelldickenson@gmail.com wrote:

Tony,

Apologies. I intended to reply to your email soon after I received it... but I forgot. :(

Your explanation was detailed and made perfect sense. I can now understand the difference between superUserContent and, for example, Stylish.

I will do my best to promote superUserContent as I think it makes a fantastic addition to Firefox.

On 27 May 2014 12:00, Tony Crisci notifications@github.com wrote:

Can you please explain how this extension essentially differs from specifying custom CSS via ~/.mozilla/firefox//chrome/userContent.css, and how it compares with something like the Stylish addon?

What I wanted from this extension was:

1) an easy way to correct mistakes and remove "stupid stuff" from websites I visit 2) apply and correct mistakes in themes from userstyles.org

This can be done with chrome/userContent.css in your Firefox profile, except for this bug https://bugzilla.mozilla.org/show_bug.cgi?id=208641 which requires you to restart the browser anytime you make changes to the file for the changes to take effect. I looked at the Firefox source code and found that userContent.css is heavily cached so fixing the bug would require big changes that I don't have the clout within Mozilla to make.

Stylish makes this possible, but they made some design choices that make things difficult for people who prefer Unix engineering principles.

Stylish does not store themes as plain text files, but rather the stylesheets are stored within a relational database. This sort of abstraction of the filesystem is common practice among Windows engineers, but makes things difficult for people who prefer their own text editor and command-line tools. Making changes to the stylesheets ties you to Stylish's own implementation of a text editor or their database, which makes working with themes difficult for a Linux user.

superUserContent exposes these stylesheets as plaintext files, which is more familiar to someone used to the Unix concepts of "less is more" and "everything is a file" using the Xorg-style "conf.d" concept for modular configuration.

This allows me to replace Stylish with a much lighter add-on (only 59 source lines of code) that I can use easily with Vim.

I agree that some documentation would help get people started. As for getting more users, I would love to see this extension featured on the Firefox Add-ons home page.

I am not very good at promoting things. If you would like to help promote the project, that would be much appreciated. I would like to see more simple tools like this available for Linux people.

Reply to this email directly or view it on GitHub https://github.com/acrisci/superUserContent/issues/1#issuecomment-44229190 .

acrisci commented 10 years ago

Hi,

Here is documentation on the @document css rule.

The stylesheets in superUserContent are all global by default unless you put them in a document rule.

You shouldn't have to create the directory because the add-on creates it for you. It should be located at /path/to/profile/chrome/userContent.css.d.

phayz commented 10 years ago

Tony,

How embarrassing! My problem was due to one simple mistake - I was putting the CSS into the directory /userContent.css.d. In other words, I was missing the "chrome" part of the path. :(

Thank you for taking the time to help me fix my own, stupid mistake.

Now I can work on tweaking my CSS to suit. \O/

On 25 August 2014 15:34, Tony Crisci notifications@github.com wrote:

Hi,

Here is documentation on the @document css rule https://developer.mozilla.org/en-US/docs/Web/CSS/@document.

The stylesheets in superUserContent are all global by default unless you put them in a document rule.

You shouldn't have to create the directory because the add-on creates it for you. It should be located at /path/to/profile/chrome/userContent.css.d .

Reply to this email directly or view it on GitHub https://github.com/acrisci/superUserContent/issues/1#issuecomment-53228176 .