CSS 2 Flashcards
What are the four components of “the Cascade”?
source order, inheritance, specificity, !important
What does the term “source order” mean with respect to CSS?
the order that your CSS rules are written in your stylesheet, rules that are lower have higher priority
How is it possible for the styles of an element to be applied to its children as well without an additional CSS rule?
inheritance occurs
List the three selector types in order of increasing specificity.
type selector, class selector, ID selector
Why is using !important considered bad practice?
it makes debugging more difficult by breaking the natural cascading in your stylesheets
What does the transform property do?
rotates, scales, skews, or translates an element
Give four examples of CSS transform functions.
rotate(), scale(), skew(), translate()
The transition property is shorthand for which four CSS properties?
transition-property, duration, timing, delay
Give two examples of media features that you can query in an @media rule.
width, height
Which HTML meta tag is used in mobile-responsive web pages?
viewport meta element
What is the effect of setting an element to display: none?
element and descendant elements are hidden, not rendered at all
What is a breakpoint in responsive Web design?
point at which we choose to restructure layout
What is the advantage of using a percentage (e.g. 50%) width instead of a fixed (e.g. px) width for a “column” class in a responsive layout?
column will dynamically fit with percentage of page
If you introduce CSS rules for a smaller min-width after the styles for a larger min-width in your style sheet, the CSS rules for the smaller min-width will “win”. Why is that?
source order