8legged

CSS Properties and Selectors

Properties

outline

1
2
3
4
5
6
7
/* width | style | color */
outline: 1px solid white;

/* Global values */
outline: inherit;
outline: initial;
outline: unset;

The outline property in CSS draws a line around the outside of an element. It’s similar to border except that:

  • You can’t specify particular sides
  • It’s not a part of the box model, so it won’t effect the position of the element or adjacent elements
  • It doesn’t respect border-radius (makes sense - it’s not a border)
  • It isn’t always rectangular. If the outline goes around an inline element with different font-sizes, for instance, Opera will draw a staggered box around it all.

Often used for accessibility reasons, to emphasize a link when tabbed to without affecting positioning and in a different way than hover.

Selectors

Pseudo class selectors are CSS selectors with a colon preceding them.

a:hover {

}

Tools

Post written on August 5, 2015
Post written on 2015-08-05 00:00:00 -0700