MozillaZine

Stylish 0.2.1 (Now with repository!)

Talk about add-ons and extension development.
old np
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted December 30th, 2005, 4:07 pm

That's it? Ha! Thanks.

Motohiko
 
Posts: 65
Joined: November 22nd, 2003, 8:05 pm
Location: Japan

Post Posted December 31st, 2005, 4:34 am

np wrote:I think it's important to allow the user to split up their current userChrome/userContent entries into many Stylish entries. Just importing the entire file into a single entry is contrary to one of the main features of Stylish - being able to manage each customization individually. I think you should bring up a dialog that contains the text of one of the files, allow the user to select and add the selection as a Stylish entry.
IMHO, splitting feature is not so important.

Importing userChrome/userContent.css is a way to manage them by Stylish. Once you import them, you can add, remove and modify them very easy. After importing, you can split up user stylesheets as you like.
Splititng feature is something helpful, yes, but not nessesary, I think.


...And I'm thinking about automatic splitting feature.

old np
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted January 1st, 2006, 1:32 am

Stylish 0.2 has been released. Download here

What is Stylish?
Stylish is to CSS what Greasemonkey is to JavaScript. Stylish allows you to easily manage user styles for the application UI, all websites, or only certain websites. Stylish is better than using userChrome.css/userContent.css because styles are applied immediately instead of requiring a restart.

Supported applications
* Firefox 1.5 beta1 to 1.6a1 (trunk nightlies).
* Flock, all versions
* Thunderbird 1.5 beta to 1.6

Locales: de-DE, en-US, es-ES, fr, it, nl-NL, ja

New features
* Instant apply of styles - no longer have to reload the page
* UI to insert -moz-document syntax
* UI to insert XUL/HTML default namespace code. This will make all selectors only apply to XUL or HTML, preventing conflicts.
* Status bar icon with the option to add a style for the current page/domain.
* Status bar icon also lists and lets you enable/disable styles for the current page (all styles who have a -moz-document for the page). Disabling styles won't take effect immediately (see known issues)
* Improved Manage Styles dialog

Fixed bugs
* Deleting a style will hide all styles below it in the manage dialog. They reappear when the dialog is closed and reopened.
* Styles are not validated before they are added.

Known issues
* If you delete all the styles, you can't add a new one without reopening the window
* Styles are not sortable
* You can turn on and then immediately turn off a style, but if you load a page after the application of a style, you can't instant unapply it.
* Instant apply has a slightly different priority than normal apply. As long as you use !important, it shouldn't be a problem.
* Some CSS properties don't instant apply well on some elements. This is especially true of XUL elements. I'd be interested in knowing what exactly doesn't work so I can file bugs on the problems.
* For some platforms/themes, checkboxes may not be too visible in the Manage Styles window when the style is highlighted.

Conflicts
* Stylish conflicts with Search Engine Ordering 0.5.2 and below. The author of SEO has released a "silent upgrade" that fixes this problem. If you use SEO, uninstall it and reinstall from the author's website.
* On a page containing an Adblocked frame or iframe, Stylish may not be able to apply styles correctly. This is a known issue that will be fixed in the next release of Stylish.

Possible future features
* If the first line of a style is comments, that should become the description of the style.
* Import userChrome.css and userContent.css
* Link to style repository
* The ability to edit existing -moz-document rules with a UI

Upgrade note
* To take full advantage of status bar icon, existing styles from 0.1 that use -moz-document should be re-saved (open the edit page and save it)
Last edited by old np on January 6th, 2006, 10:23 pm, edited 3 times in total.

********
 
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post Posted January 1st, 2006, 5:17 pm

hmm, well i downloaded and installed Stylish 0.2 as planned, but when i try to enable a style (in this case, just testing out "disable autocomplete"), it tries to reload my pages or something and my tabs end up blank with no history and no title, just a favicon, and i can't even close the tab!

so i had to disable the extension. sorry.

i'll probably try again later when i have more time to experiment, but right now, i can't afford to mess up my Tab Mix Plus session manager and my profile.

Check out the "My Config" in my signature for more info on my extensions.

old np
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted January 1st, 2006, 7:34 pm

No idea why that would happen... The exact build (1.5 release on WinXP) works fine for me. I'd appreciate any further testing you could do into it.

Jivecat
 
Posts: 2
Joined: January 3rd, 2006, 4:02 am

Post Posted January 3rd, 2006, 4:12 am

desertfox wrote:hmm, well i downloaded and installed Stylish 0.2 as planned, but when i try to enable a style (in this case, just testing out "disable autocomplete"), it tries to reload my pages or something and my tabs end up blank with no history and no title, just a favicon, and i can't even close the tab!


The same thing happened to me after installing and running Stylish 0.2 for the first time (no previous versions installed).

It seems related to the automatic updating of styles, as it happened when the styles were applied.

This is what happens in Firefox (v1.5) on my system (Win XP):

- All open tabs go blank (In all open Firefox windows)
- All tabs titles are renamed to "(Untitled)" (no quotes)
- Affected Tabs cannot be closed (the window can be closed, however)
- Tab session is lost on browser restart (using TMP extension)
- Location bar is blank for all affected tags
- Favicons are messed up (Favicon remains for affected tabs even if a new URL is typed into the location bar and browser navigates to new URL)
- Seems to affect other extensions as well because my mouse gestures (All-in-One Gestures) will not work until I restart the browser or at least open a new window.

This all happens whenever a style is disabled via Stylish's Manage Styles dialog. Enabling doesn't seem to cause any problems, but as soon as a style is disabled (at least all of the included stock styles), all tabs are blank.
This basically means that the browser needs to be restarted whenever a change has been made and all tabs will be lost.

This extension sounds great, but it seems like something's broken in the new release.

Motohiko
 
Posts: 65
Joined: November 22nd, 2003, 8:05 pm
Location: Japan

Post Posted January 3rd, 2006, 6:16 am

I've found context menu of the status bar icon is something wrong for us.
For 'www.yomiuri.co.jp', Stylish creates 3 context menu entries for that domain.
  • www.yomiuri.co.jp
  • yomiuri.co.jp
  • co.jp
Image
But, the last one is wrong. co.jp is one of the organizational type JP domain names, this should not be listed.

I made a proposed patch for this.
This patch treats these second level domains (SLDs) is reserved, not be listed:
  • One or two lettered. These are short enough to be reserved. Is there any ccTLDs expose this type?
  • Same as one of the gTLDs. I know Taiwan's registrar/registry uses this type (for commercial: .com.tw).


This patch adds reserved names in a preference. If new reserved string is added, you can add it easily.

Motohiko
 
Posts: 65
Joined: November 22nd, 2003, 8:05 pm
Location: Japan

Post Posted January 3rd, 2006, 6:29 am

Yes, the instant applying code is terrible thing. The code also adds 'link' element to every 'window's and 'dialog's.

I don't have that problem, I hope this patch helps you.

Note: accoding to np's comment, we cannot add xml-stylesheet PI to XML document (Bug 319654). Stylish can apply the style to HTML/XHTML document immediately, but not to XML documents.


Thank you.

********
 
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post Posted January 3rd, 2006, 7:33 am

Jivecat wrote:
desertfox wrote:hmm, well i downloaded and installed Stylish 0.2 as planned, but when i try to enable a style (in this case, just testing out "disable autocomplete"), it tries to reload my pages or something and my tabs end up blank with no history and no title, just a favicon, and i can't even close the tab!


The same thing happened to me after installing and running Stylish 0.2 for the first time (no previous versions installed).

It seems related to the automatic updating of styles, as it happened when the styles were applied.

...

This extension sounds great, but it seems like something's broken in the new release.


i knew i wasn't crazy when i said it was broken somehow.

it must have something to do with instant apply...

old np
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted January 3rd, 2006, 8:41 am

I don't get it... it works here fine. Do all the stock styles screw up, even the Slashdot one? Does the Javascript Console say anything? And this happens only on disable? *boggle*

[edit]It's one of desertfox's extensions listed in his config. Trying to narrow down... [/edit]

[edit2]It's Search Engine Ordering. Trying to figure out what the problem is and whether I can work around the conflict.[/edit2]
Last edited by old np on January 3rd, 2006, 9:19 am, edited 1 time in total.

old np
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted January 3rd, 2006, 9:05 am

Motohiko wrote:Yes, the instant applying code is terrible thing. The code also adds 'link' element to every 'window's and 'dialog's.

There's nothing fundamentally wrong with adding html:link to XML pages.

As for the co.jp thing, I knew of the problem but couldn't think of a good solution to it.

Jivecat
 
Posts: 2
Joined: January 3rd, 2006, 4:02 am

Post Posted January 3rd, 2006, 11:59 am

Interesting conflict. I too had the Search Engine Ordering extension installed. I uninstalled it (don't use it too much anyway, but would be nice to have a better solution to this issue), and now Stylish works!

I love it!
Last edited by Jivecat on January 3rd, 2006, 8:30 pm, edited 1 time in total.

old np
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted January 3rd, 2006, 6:47 pm

I've found the conflict. Search Engine Ordering uses XBL to define a "link" element in the XUL namespace. Stylish inserts HTML link elements to do the instant apply. That's no problem - they're in different namespaces. However, Search Engine Ordering's stylesheet binds all link elements, not just the XUL links, so everything get borked when Stylish throws HTML links everywhere and Firefox tries to bind them. Fixing it is simple, but has to be done from Search Engine Ordering's end. I'll see if I can get a hold of the author. Thank you all for helping solve the problem.

old np
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted January 3rd, 2006, 7:17 pm

Motohiko wrote:But, the last one is wrong. co.jp is one of the organizational type JP domain names, this should not be listed.

There's no good way of figuring out what should be listed and what shouldn't - it's the same kind of issue as bug 252342. There are many two letter domains in .com (ty.com). Some of the reserved domains in the preference are OK in some domains (asia.com).

Seeing as the worst that could happen without the patch is the user gets a weird option (which would work anyway!) and the worst that could happen with the patch is the user is missing an option, I'd rather just leave it for now.

********
 
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post Posted January 3rd, 2006, 7:33 pm

np wrote:I've found the conflict. Search Engine Ordering uses XBL to define a "link" element in the XUL namespace. Stylish inserts HTML link elements to do the instant apply. That's no problem - they're in different namespaces. However, Search Engine Ordering's stylesheet binds all link elements, not just the XUL links, so everything get borked when Stylish throws HTML links everywhere and Firefox tries to bind them. Fixing it is simple, but has to be done from Search Engine Ordering's end. I'll see if I can get a hold of the author. Thank you all for helping solve the problem.


sweet! i'll just disable SEO for now (i only need it when i install a fresh version of firefox anyway) and off i go with Stylish! :D

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest