This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2012-01-04 12:29:49

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Custom Scratch forum skins!

nXIII wrote:

Hardmath123 wrote:

scimonster wrote:

Nice. Why do you do this with JS and not CSS?  tongue

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

 

#27 2012-01-04 12:34:28

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Custom Scratch forum skins!

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.


nXIII

Offline

 

#28 2012-01-04 22:28:03

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Custom Scratch forum skins!

roijac wrote:

you can't do that in google chrome  tongue

No? Then how does this work?


Posts: 20000 - Show all posts

Offline

 

#29 2012-01-05 07:39:34

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Custom Scratch forum skins!

nXIII wrote:

Hardmath123 wrote:

scimonster wrote:

Nice. Why do you do this with JS and not CSS?  tongue

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.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#30 2012-01-05 11:38:38

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Custom Scratch forum skins!

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

 

#31 2012-01-05 11:57:19

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Custom Scratch forum skins!

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


nXIII

Offline

 

#32 2012-01-07 12:22:59

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Custom Scratch forum skins!

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)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#33 2012-01-08 02:33:52

NeilWest
Scratcher
Registered: 2010-01-06
Posts: 1000+

Re: Custom Scratch forum skins!

Will we be able to use pictures? For the background?

Offline

 

#34 2012-01-08 05:36:51

roijac_test
Scratcher
Registered: 2011-08-31
Posts: 49

Re: Custom Scratch forum skins!

veggieman001 wrote:

roijac wrote:

you can't do that in google chrome  tongue

No? Then how does this work?

im not talking webGL support, im talking about tilt


http://gigabyte.50webs.com/funnyerrormessages/work013.jpg

Offline

 

#35 2012-01-08 05:41:58

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: Custom Scratch forum skins!

roijac_test wrote:

veggieman001 wrote:

roijac wrote:

you can't do that in google chrome  tongue

No? Then how does this work?

im not talking webGL support, im talking about tilt

i'm using it right now just search for tilt


http://i.imgur.com/1QqnHxQ.png

Offline

 

#36 2012-01-08 06:09:57

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Custom Scratch forum skins!

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.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

Board footer