Skip to content

Double-Colon Notation (::) #2

Description

@vanribeiro

About the Pseudo-Elements

Browsers need to offer support to the CSS 1 and 2 and to accept the one-colon notation (:) when we use the pseudo-elements.

But following the CSS documentation, it's important to use double-colon notation (::) with pseudo-elements to make difference between it and pseudo-classes, which use one-colon notation (:). This improves the code readability and understanding.

For example:

Pseudo-elements:

p::first-line{
  color: red.
}

Pseudo-classes:

a:hover{
   color: blue;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions