I recently discovered this "boilerplate" and instantly fell in love with it, basically because it is simplistic, pretty lightweight and unlike other css frameworks, does not impact your design.
Looking at it's source code, though, it raises some questions, like for example this part here
input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
height: 38px;
padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
background-color: #fff;
border: 1px solid #D1D1D1;
border-radius: 4px;
box-shadow: none;
box-sizing: border-box; }
/* Removes awkward default styles on some inputs for iOS */
input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
textarea {
min-height: 65px;
padding-top: 6px;
padding-bottom: 6px; }
Like it isn't bad enough they use universal selectors with attributes, but they do it twice?
A few lines below I see this part
input,
textarea,
select,
fieldset {
margin-bottom: 1.5rem; }
Which could be inserted into the previous rule set I mentioned and avoid the double (or triple) universal selectors.
Here's another one
.container:after,
.row:after,
.u-cf {
content: "";
display: table;
clear: both; }
The clearfix utility class is missing :after
.
Looking at their github page, the last update was about 7 months ago, so I suppose they will not be releasing any fixes.
I'm no CSS guru though, so I would like to ask if my suspicions are correct and ultimately, can you give me some names for other CSS frameworks that work the same way but aren't as poorly written?
Aucun commentaire:
Enregistrer un commentaire