mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): improve explanation of chained pseudo-classes (#64489)
Co-authored-by: Ali Farooqi <ali.farooqi@kmon.net> Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
246368a086
commit
8e861141dd
+3
-2
@@ -9,8 +9,9 @@ dashedName: step-14
|
||||
|
||||
Now that your checkboxes change color when the user clicks them, you are going to apply some styling to make it a little more obvious that the checkbox has been selected.
|
||||
|
||||
First, create a new type selector of `input[type="checkbox"]` with the previous pseudo-class selector of `:checked` and add the pseudo-element selector of `::after`.
|
||||
This will specifically target what happens after the user has checked the box.
|
||||
CSS pseudo-classes can be chained. You can add one pseudo-class or pseudo-element after another to target elements that meet multiple conditions.
|
||||
|
||||
Create a new selector for `input[type="checkbox"]`. Add the `:checked` pseudo-class followed by the `::after` pseudo-element. This allows you to add a visual indicator when the checkbox is checked.
|
||||
|
||||
Next, add `content` with the value of `"✓"`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user