CSS accent-color
For better or worse, form fields have been somewhat difficult to style with CSS. Form control display is dependent upon device, operating system, and browser, so you can imagine the difficulty in making styling easy. We have slowly been given some controls over form control display, as evidenced by accent-color
!
The accent-color
CSS property allows us to change the accent of input
, input[type=radio]
, and input[type=checkbox]
elements!
input {
accent-color: blue;
}
input[type=checkbox] {
accent-color: red;
}
See the Pen
by David Walsh (@darkwing)
on CodePen.
accent-color
is a lovely addition to input
CSS elements. I love any CSS feature that encourages using native elements instead of shimming your own to improve branding and design. Let's hope for more CSS features like accent-color
!
Introduction
For quite a long time now websites with the so called "parallax" effect have been really popular.
In case you have not heard of this effect, it basically includes different layers of images that are moving in different directions or with different speed. This leads to a...
My first professional web development was at a small print shop where I sat in a windowless cubical all day. I suffered that boxed in environment for almost five years before I was able to find a remote job where I worked from home. The first...
There's a very interesting piece of code on Google Code called FontAvailable which does a jQuery-based JavaScript check on a string to check whether or not your system has a specific font based upon its output width. I've ported this functionality to MooTools.
The MooTools...
One of the important functions of CSS is to position elements.
Margin
, padding
, top
, left
, right
, bottom
, position
, and z-index
are just a few of the major players in CSS positioning.
By using the above spacing...
The accent-color CSS property allows us to change the accent of input ….. JUST IN CHROME!
In Safari, FF, – its not working
Check this before: https://caniuse.com/?search=accent-color