CSS

From Computer Science Wiki
Jump to: navigation, search
CSS[1]

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in HTML and XHTML, the language can be applied to any XML document, including plain XML, SVG and XUL, and is applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications.[2]

Although this is debatable, CSS is a Domain-specific declarative language. It serves a very specific purpose in a rather narrow capacity when compared to other formal programming languages.


Basic ideas

CSS Syntax

At its most basic level, CSS consists of two building blocks:

  • Properties: Human-readable identifiers that indicate which stylistic features (e.g. font, width, background color) you want to change.
  • Values: Each specified property is given a value, which indicates how you want to change those stylistic features (e.g. what you want to change the font, width or background color to.)

A property paired with a value is called a CSS declaration. CSS declarations are put within CSS Declaration Blocks. And finally, CSS declaration blocks are paired with selectors to produce CSS Rulesets (or CSS Rules).[3]Css syntax.png

Selectors

  • Selectors defineGive the precise meaning of a word, phrase, concept or physical quantity. to which elements a set of CSS rules applyUse an idea, equation, principle, theory or law in relation to a given problem or issue.. [4]

Properties and Values

Moziulla developers networka group or system of interconnected people or things. has excellent resources and information for CSS[5]

  • Properties: Human-readable identifiers that indicate which stylistic features (e.g. font, width, background color) you want to change.
  • Values: Each specified property is given a value, which indicates how you want to change those stylistic features (e.g. what you want to change the font, width or background color to.)


Please click here for a well organized list of properties

Units of measurements

In CSS you will often specify how large you want something to be (for example, the font size of something, or maybe the width of a border). There are two different categories of measurements, absolute and relative. As usual, our friends at the Mozilla Developers Networka group or system of interconnected people or things. have good to teach us about CSS Units of measurement[6]

Relative length units Relative lengths describeGive a detailed account or picture of a situation, event, pattern or process. a length in terms of some other length, such as the size of a specific character in the current font, the size of the parent element, or the size of the viewport. Relative length units indicate which other length the specified value is relative to.

Absolute length units Absolute length units represent a physical measurement when the physical properties of the output medium are known, such as for print layout. This is done by anchoring one of the units to a physical unit, and then defining the others relative to it. The anchor is done differently for low-resolution devices, such as screens, and high-resolution devices, such as printers.

Please do look at the following links. All of them say essentially the same thing in different ways, how units of measurement work in CSS:


Standards

  • DefineGive the precise meaning of a word, phrase, concept or physical quantity. CSS
  • DiscussOffer a considered and balanced review that includes a range of arguments, factors or hypotheses. Opinions or conclusions should be presented clearly and supported by appropriate evidence. structure of CSS and the cascade
  • DemonstrateProve or make clear by reasoning or evidence, illustrating with examples or practical application. knowledge and skill using selectors
  • DemonstrateProve or make clear by reasoning or evidence, illustrating with examples or practical application. knowledge and skill using values and units
  • DemonstrateProve or make clear by reasoning or evidence, illustrating with examples or practical application. knowledge and skill using text properties
  • DemonstrateProve or make clear by reasoning or evidence, illustrating with examples or practical application. knowledge and skill using basic visual properties
  • DemonstrateProve or make clear by reasoning or evidence, illustrating with examples or practical application. knowledge and skill using padding, borders and margins
  • DemonstrateProve or make clear by reasoning or evidence, illustrating with examples or practical application. knowledge and skill using colors, borders and backgrounds
  • DemonstrateProve or make clear by reasoning or evidence, illustrating with examples or practical application. knowledge and skill using floating and positioning
  • DemonstrateProve or make clear by reasoning or evidence, illustrating with examples or practical application. knowledge and skill using box model

References

  1. http://www.flaticon.com/
  2. https://en.wikipedia.org/wiki/Cascading_Style_Sheets
  3. https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Syntax
  4. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors
  5. https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Syntax
  6. https://developer.mozilla.org/en/docs/Web/CSS/length