Remove redundant properties from .embed-responsive#28062
Remove redundant properties from .embed-responsive#28062MartijnCuppens merged 1 commit intomasterfrom
.embed-responsive#28062Conversation
|
I want to hear @necolas 's thoughts. |
|
I also wonder if this css: .embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object {
...
}should be rewritten as: .embed-responsive > * {
...
}I know we better avoid the universal selector but I think for this case with the child combinator and the decrement of the number of selectors, it might be acceptable. |
|
The biggest problems we had with selector performance issue we ever had was using them too much with attribute selectors for column classes. In these instances, I think it's acceptable. However, I'm curious if folks have other content within these elements? Does anything else accompany an embed other than the source? |
|
I believe it's better to err on the safe side and be as explicit as possible IMO. |
|
I confirmed the CSS are correct in theory, and tested in IE11, Edge, Firefox and Chrome. Let’s merge this. @MartijnCuppens Would you fix the conflict? |
4c829b1 to
387ae84
Compare
|
Done |
387ae84 to
b9673d4
Compare
|
This is a minor optimization, not worth backporting this to |
We copied the
.embed-responsivecode from somewhere else, but there are a lot of redundant properties in it:display: block;on a<div>paddingfrom a<div>overflow: hidden;because the inner content is spread in.embed-responsivebottom: 0;, because we already haveheight: 100%;