changing the color of a part of text in stylus css?

unknown picture unknown · Jul 11, 2012 · Viewed 17.7k times · Source

i want to change the color of only one word in string of text using stylus i.e.

#copy
   h1 Our new site will be ready soon..

the stylus code is

  h1
   font-weight bold
   color white

i just want to change the color of the first letter in the h1 phrase "Our" into yellow how could i achieve that in stylus, thanks :)

Answer

Nik picture Nik · Jul 11, 2012

The css selector "first-letter" selector is a good option.

If you want to change other letters or parts of text as per your example, use a span with its own style, e.g.

<h1><span style="color:yellow">O</span>ur <span style="color:blue">new</span> website</h1>