Another benefit of relying purely on CSS - A quick way to alter colors if needed which comes in handy when making changes for different states. It also makes development pretty rapid and aids quick style guide developing.
Unless I'm overlooking something there, it doesn't make much sense to use RGBA whilst you have 100% opacity for each color as the opacity declaration isn't needed and you would need to specify alternatives for other browsers anyway - rendering the RGBA declarations pointless.
You are correct. I what I pasted here was at 100% opacity which would be pointless. I was just trying to see if it was possible since I really hadn't done css gradient. :)
9 Responses
Another benefit of relying purely on CSS - A quick way to alter colors if needed which comes in handy when making changes for different states. It also makes development pretty rapid and aids quick style guide developing.
about 2 years ago
So you're using CSS gradient here?
about 2 years ago
Yup. Here's the CSS used for the default button if you're interested:
about 2 years ago
Yikes....should probably link to a stylesheet from now on ;)
about 2 years ago
Awesome! Thanks Dave!
about 2 years ago
Hey I played around and used rgba with your gradient code.
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(27, 99, 171, 1)), to(rgba(20, 72, 122, 1)));
background: -moz-gradient(linear, 0% 0%, 0% 100%, from(rgba(27, 99, 171, 1)), to(rgba(20, 72, 122, 1)));
about 2 years ago
Unless I'm overlooking something there, it doesn't make much sense to use RGBA whilst you have 100% opacity for each color as the opacity declaration isn't needed and you would need to specify alternatives for other browsers anyway - rendering the RGBA declarations pointless.
about 2 years ago
You are correct. I what I pasted here was at 100% opacity which would be pointless. I was just trying to see if it was possible since I really hadn't done css gradient. :)
about 2 years ago
Ah! Yeah, it's great being able to get away with a minimal amount of imagery.
about 2 years ago