Friday, February 22nd, 2019
In this example .article-grid
will be block
unless the browser has support for display: grid
, at which case, the styles within the @supports
block will kick in and override the previous display
declaration.
.article-grid {
display: block;
}
@supports (display: grid) {
.article-grid {
display: grid;
}
}
Tags: @supports, browser support, CSS, css3, Display, Grid
Posted in CSS | No Comments »
Tuesday, February 12th, 2019
Drop this in to your console in dev tools and all elements with position: absolute
will render with a border.
var absElements = [];
$("*").css("position", function(i, pos){
if(pos==="absolute") absElements.push(this);
});
$(absElements).css({border:"5px solid red"});
Tags: attribute, CSS, elements, find, jQuery, propert, search by property, search for
Posted in CSS, jQuery | No Comments »