[Ext] Stylish 0.3.2

Announce and Discuss the Latest Theme and Extension Releases.
Locked
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

When you want to select elements that have no ID or class, you can go by their position on the page (ex: the first child of a div), by their attributes (the table with 600 width), or by a combination. If you link to the page, we could figure out what's best for this situation and write you up a style.

As Zoolcar9, you can't scroll a page with CSS, but there are ways you could move that text to the top.
Paros
Posts: 32
Joined: December 9th, 2004, 12:11 pm

Post by Paros »

The page is at http://www.fenderforum.com/forum.html and my goal was to be able to remove all the content on the top of the page up to where the main table with the forums/posts starts (at my 1280x1024 resolution the main forums table is not even visible on the first screen).

Thank you very much for your help! I figured out how to do a simple change on the table widths on the site but I don't know yet how to filter on specific attributes.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Code: Select all

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("fenderforum.com") {
/* top part */
body > center > p:first-child {
  display: none !important;
}

/* everything in the main part */
body > center > p + p > font > * {
  display: none !important;
}

/* everything in the main part that's important */
body > center > p + p > font > table[width="600"][border="0"] ~ * {
  display: block !important;
}
}
rtk
Posts: 275
Joined: January 17th, 2005, 4:33 pm

Post by rtk »

It's always interesting to see how the pros do it, particularly on a site nearly devoid of ids and classes.

Is it higher specificity, or placement of the block vs. none rule that makes this work?
rtk
Paros
Posts: 32
Joined: December 9th, 2004, 12:11 pm

Post by Paros »

Yowza!!

Now I have to figure out what all that code means. :) Thank you very much! This is really a great plugin!
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

The main structure is like so

Code: Select all

HTML
  BODY
    CENTER
      P
      P


body > center > p:first-child takes out the first P. (The p first child of the center who is a child of body).

Inside the second p is

Code: Select all

P
  FONT
    (junk)
    TABLE (junk table)
    TABLE (main table)
    (other stuff)


So to select things in there we start with body > center > p + p > font (the font child of the p that comes after a p who is a child of a center who is a child of a body).

After that, I'm taking out every child, > *, then putting back every child after the last junk element, > table[width="600"][border="0"] ~ *. This is saying anything after the table whose width is 600 and whose border is 0 and who is a child of font. This rule is more specific than the previous because it includes more attribute selectors, so it overrides it.

So yeah, this is pretty complicated because the request was complex ("this element and everything after this is OK").
LastNickLeft
Posts: 2
Joined: September 27th, 2006, 5:06 pm

Post by LastNickLeft »

Hi,

Im trying to hide/show a toolbar when I hover the status bar. My toolbar is called "__customToolbar_MyBookmarks". I can make it hide, but not to show. This is what I have....

Code: Select all

#__customToolbar_MyBookmarks {
  display: none;
}

#status-bar > #__customToolbar_MyBookmarks,
#statusbar-display > #__customToolbar_MyBookmarks {
  display: -moz-box;
}


...any suggestions?

Also, is there a way of moving this "__customToolbar_MyBookmarks" to the bottom? Right now im using the "Toolbar Control" extension to achieve this, but a whole extension just for doing this is too much, I think.

Thanks in advance.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Grist wrote:The value for orient could be changed to horizontal.

That breaks icons and text mode.

I tried TMP 0.3.0.60915, and its icon shows the same as Stylish's.

[edit]
Nevermind, I figured it out. I need to bind it to toolbarbutton.xml#menu-vertical and get rid of the dropmarker's width.
[/edit]
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

http://userstyles.org/apps/stylish-dev.xpi

Results of my Firefox 2.0 RC1 and Thunderbird testing. Just fixes some visual issues. I'm going to test Flock tomorrow, then it's out the door.
rtk
Posts: 275
Joined: January 17th, 2005, 4:33 pm

Post by rtk »

Awesome! Thanks NP. It seems like the arrow is a little too close to the icon though, a 3px margin-left looks right IMHO.
rtk
User avatar
XerBlade
Posts: 865
Joined: October 4th, 2005, 10:45 pm
Location: Nashville, TN, US

Post by XerBlade »

Looks to be the correct margin for a menulist-only button, to me at least. It's buttons with separate drop-down menus which naturally have arrows with a greater margin, to show the fact that they are actually separate clickable entities rather than just two visual elements of the same clickable entity.
User Agent
Extensions
AMD64/2.41GHz RAM/1.0GB ATI/256MB-GDDR3/128-bit/8xAGP Cable6.0M/384kbps
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

Unfortunately, the fix I made breaks Firefox and Thunderbird 1.5 and Flock... I'm going to have to write some JavaScript to figure out the correct style to apply to the button.
old np
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old np »

We're up to Stylish 0.4 now. See this thread.
Locked