Here’s a quick little something you may not have known about CSS borders.
border shorthand can be used without providing a color value. This is completely valid CSS:
border: 1px solid;
Now that’s not so interesting in itself, right? What makes this interesting is the fact that when you don’t provide a border color value, it inherits the
color value of the container, making it the same color as the text it surrounds.
border: 1px solid; color: #c00;
This might save you a little code the next time you’re styling links with borders instead of
text-decoration, like when you’re using anything other than the standard
Got any more CSS time savers? Let us know in the comments!