How are CSS properties implemented by different browsers?

It's kind of an academic question. I'm just wondering how different browsers implement CSS properties like colors and gradients?

I found some information on the internet, but I don't understand it.

Please explain simply.

+3


source to share


1 answer


For the most part, browsers follow different specifications.

Colors and gradients are defined in various CSS specifications that are maintained by the World Wide Web Consortium (W3C). For example, the CSS2 specification can be found here: http://www.w3.org/TR/CSS2/ .

Sometimes these specifications are a little vague, leading to differences in how different browsers implement similar features.



To answer your question. Section 14 of the spec I linked to above deals with Colors and Backgrounds . However, this is now deprecated and replaced by two level 3 modules: Backgrounds and borders of a level 3 module and a Color module of level 3 . Background gradients are actually documented in Image Values โ€‹โ€‹and Content Level 3 Fallout . An example from the latter:

A gradient is an image that fades from one color to another. They are commonly used for subtle shading in background images, buttons, and more. The gradient notation described in this section allows the author to specify such an image in short syntax so that the UA can automatically generate the image when the page is rendered. The syntax <gradient>

is:

<gradient> = [ 
    <linear-gradient> | <radial-gradient> | 
    <repeating-linear-gradient> | <repeating-radial-gradient> ]

      

In various available specifications, the term User Agent (abbreviated to UA as shown in the quote above) is used to refer to the browser and how the browser should implement the discussed functionality.

+3


source







All Articles