Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double-Colon Notation (::) #2

Open
vanribeiro opened this issue Mar 23, 2020 · 0 comments
Open

Double-Colon Notation (::) #2

vanribeiro opened this issue Mar 23, 2020 · 0 comments

Comments

@vanribeiro
Copy link
Contributor

vanribeiro commented Mar 23, 2020

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;
}
@vanribeiro vanribeiro changed the title Double Colon Notation (::) Double-Colon Notation (::) Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant