Home › Forums › Basel support forum › CSS properties overridden by shorthands
CSS properties overridden by shorthands
- This topic has 1 reply, 2 voices, and was last updated 4 years, 2 months ago by Artem Temos.
-
AuthorPosts
-
September 17, 2020 at 10:42 am #226970
pierredemeudonParticipantHi There,
When auditing my website, I received this comment
When a property is used 2 times within a CSS rule, the second one overrides the first.
CSS provides some shorthand properties, that can leads to some mistakes. For instance, the “border” property is applied to all borders of an element, avoiding the use of all “border-top”, “border-right”, “border-left” and “border-bottom” properties.The use of shorthand properties is risky, because it comes with an implicit override. If the resulting style on your page is the desired one -what is the case for me- you should delete the overridden property (it will also reduce the file size).
https://polinacouture.com/wp-content/themes/basel/style.css?ver=5.3.0
.mobile-nav .searchform.search-loading:after: “border-color” resets “border-right-color” property set earlier (line 4181, col 5)
.mobile-nav .searchform.search-loading:after: “border-color” resets “border-left-color” property set earlier (line 4181, col 5)
.search-extended form.search-loading:after: “border-color” resets “border-right-color” property set earlier (line 4789, col 3)
.search-extended form.search-loading:after: “border-color” resets “border-left-color” property set earlier (line 4789, col 3)
.basel-search-dropdown .[…]arch-inner form.search-loading:after: “border-color” resets “border-right-color” property set earlier (line 5073, col 7)
.basel-search-dropdown .[…]arch-inner form.search-loading:after: “border-color” resets “border-left-color” property set earlier (line 5073, col 7)
.basel-search-full-scree[…]arch-inner form.search-loading:after: “border-color” resets “border-right-color” property set earlier (line 5270, col 5)
.basel-search-full-scree[…]arch-inner form.search-loading:after: “border-color” resets “border-left-color” property set earlier (line 5270, col 5)
and 14 otherCould that be improved?
Kind regards
September 18, 2020 at 6:47 am #227151
Artem TemosKeymasterHello,
These overrides are required for our theme to work. And even if we remove these few lines your website will not be faster.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register