12.09.2015 Views

Boot Camp

Web Authoring Boot Camp - StudioBast

Web Authoring Boot Camp - StudioBast

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Web Authoring <strong>Boot</strong> <strong>Camp</strong><br />

• :enabled - Apply to all currently enabled inputs<br />

• :disabled - Apply to all currently disabled inputs<br />

• :checked - Apply to checked input boxes<br />

• :indeterminate - For radio and check box elements, when they are neither selected<br />

or unselected<br />

• :default - Apply to the default element, for instance the default submit button in a<br />

form<br />

Pseudo classes can come in handy when trying to increase usability. For instance, :hover<br />

can make things besides links react to a users hover, letting them know they can do things<br />

with it. They can change color, change image, become larger or bolder, and more.<br />

You can apply styling to your form input areas and textareas that only takes affect when<br />

a user has clicked into that area using the :focus pseudo class. For example, you could<br />

change the background and border color on those elements so that the visitor knows they<br />

are selected.<br />

Graceful Degradation<br />

When a browser doesn’t support a class (or any CS), it will fall back on something else.<br />

For instance, the fact that older browser don’t support rounded corners doesn’t mean you<br />

can’t implement it. It simply means that visitors won’t see the rounded corners in older<br />

browsers, bu thatt won’t affect your visitors in a site-crippling way.<br />

The same goes for pseudo classes. If you’re using an older browser which doesn’t support<br />

:focus and the user clicks on an input with a focus CSS class, the visitors won’t get the<br />

focus effect. It doesn’t alter the usability of the input field. This means you can implement<br />

most pseudo classes on a basic level (as long as they’re not being implemented in a<br />

way that’ll effect the layout of a website) without worrying about altering user experience<br />

in older browsers.<br />

210

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!