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

Added a new CSS trick (accent-color usage) #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ A handmade collection of pro css tips tricks 🌟
1. [Rainbow Animation](#rainbow-animation)
1. [Use clamp() for Responsive Typography](#disable-textarea-resizing)
1. [Create A Sticky Footer](#create-a-sticky-footer)
1. [Change Themes of Form Elements](#change-themes-of-form-elements)

### Create Documentation Styled Layout

Expand Down Expand Up @@ -726,6 +727,35 @@ footer{

<sup>[back to table of contents](#table-of-contents)</sup>

### Change Themes of Form Elements

You can change the color theme of some of the form elements out there with pure CSS.

```html
<form>
<input type="checkbox" name="check" id="check" class="checkbox"/>
<input type="radio" name ="radio" id="radio" class="radio">
<input type="range" name="range" id="range" class="range">
<progress class="progress" max="100" value="70"> </progress>
</form>
```

```css
.checkbox, .radio, .range, .progress {
accent-color: black;
}
```

<details>

<summary>See result</summary>

<img src="assets/images/changing-themes-of-form-elements.png" alt="changing themes of form elements">

</details>

<sup>[back to table of contents](#table-of-contents)</sup>


## Contributing

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.