nXIII wrote:
Hardmath123 wrote:
scimonster wrote:
Nice. Why do you do this with JS and not CSS?
![]()
How would I, with CSS?
In a userscript, just inject your stylesheet (hosted on dropbox or something) into the page.
Or use stylish for the styles.
Offline
scimonster wrote:
nXIII wrote:
Hardmath123 wrote:
How would I, with CSS?In a userscript, just inject your stylesheet (hosted on dropbox or something) into the page.
Or use stylish for the styles.
Yeah, that works better but I wanted mine to be packaged with the UserScript (it adds an options page to set the theme, etc.). The only problem is that there's a flash of default-styled content when the page first loads. I think I might do a synchronous XMLHttpRequest to fetch the CSS and avoid that, or put the styles inline in my userscript.
Offline
Offline
nXIII wrote:
Hardmath123 wrote:
scimonster wrote:
Nice. Why do you do this with JS and not CSS?
![]()
How would I, with CSS?
In a userscript, just inject your stylesheet (hosted on dropbox or something) into the page.
Yeah, but I need to override "Oxygen_cs.css", and I don't know how to do that. If I inject a new CSS (say, by editing document.head.innerHTML) after the page loads, will it affect the elements? Will it have higher priority than "Oxygen_cs.css"? I know editing a stylesheet during runtime is impractical due to compatibility issues.
Offline
Hardmath123 wrote:
nXIII wrote:
Hardmath123 wrote:
How would I, with CSS?
In a userscript, just inject your stylesheet (hosted on dropbox or something) into the page.
Yeah, but I need to override "Oxygen_cs.css", and I don't know how to do that. If I inject a new CSS (say, by editing document.head.innerHTML) after the page loads, will it affect the elements? Will it have higher priority than "Oxygen_cs.css"? I know editing a stylesheet during runtime is impractical due to compatibility issues.
Just make a Stylish one with !important everywhere.
Last edited by scimonster (2012-01-05 11:38:49)
Offline
Hardmath123 wrote:
nXIII wrote:
Hardmath123 wrote:
How would I, with CSS?In a userscript, just inject your stylesheet (hosted on dropbox or something) into the page.
Yeah, but I need to override "Oxygen_cs.css", and I don't know how to do that. If I inject a new CSS (say, by editing document.head.innerHTML) after the page loads, will it affect the elements? Will it have higher priority than "Oxygen_cs.css"? I know editing a stylesheet during runtime is impractical due to compatibility issues.
As long as your stylesheet appears below the Oxygen one (or has higher priority rules, see the spec), you can override everything in the base or oxygen stylesheets
Offline
nXIII wrote:
Hardmath123 wrote:
nXIII wrote:
In a userscript, just inject your stylesheet (hosted on dropbox or something) into the page.
Yeah, but I need to override "Oxygen_cs.css", and I don't know how to do that. If I inject a new CSS (say, by editing document.head.innerHTML) after the page loads, will it affect the elements? Will it have higher priority than "Oxygen_cs.css"? I know editing a stylesheet during runtime is impractical due to compatibility issues.
As long as your stylesheet appears below the Oxygen one (or has higher priority rules, see the spec), you can override everything in the base or oxygen stylesheets
'k, I rewrote the whole thing in CSS. Testing:
First install the Skin creator
Last edited by Hardmath123 (2012-01-07 12:32:59)
Offline
Will we be able to use pictures? For the background?
Offline
im not talking webGL support, im talking about tilt
Offline
i'm using it right now just search for tilt
Offline
NeilWest wrote:
Will we be able to use pictures? For the background?
Not with the standard userscript, but it can be very easily modified to do so.
Offline