mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Use the default CSS attributes for embedded content from HTML
The main benefit of this is respecting the iframe frameborder attribute, as frameborder="0" is a pretty common way of removing the default <iframe> border. For example, it's on all YouTube embeds by default and on some ReCAPTCHA embeds.
This commit is contained in:
parent
6a7c560849
commit
081a617d8d
Notes:
sideshowbarker
2024-07-17 06:03:55 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/081a617d8d Pull-request: https://github.com/SerenityOS/serenity/pull/15532 Reviewed-by: https://github.com/linusg
1 changed files with 43 additions and 0 deletions
|
@ -623,6 +623,49 @@ video {
|
|||
object-fit: contain;
|
||||
}
|
||||
|
||||
/* 15.4.3 Attributes for embedded content and images
|
||||
* https://html.spec.whatwg.org/multipage/rendering.html#attributes-for-embedded-content-and-images
|
||||
*/
|
||||
|
||||
iframe[frameborder='0'], iframe[frameborder=no i] { border: none; }
|
||||
|
||||
embed[align=left i], iframe[align=left i], img[align=left i],
|
||||
input[type=image i][align=left i], object[align=left i] {
|
||||
float: left;
|
||||
}
|
||||
|
||||
embed[align=right i], iframe[align=right i], img[align=right i],
|
||||
input[type=image i][align=right i], object[align=right i] {
|
||||
float: right;
|
||||
}
|
||||
|
||||
embed[align=top i], iframe[align=top i], img[align=top i],
|
||||
input[type=image i][align=top i], object[align=top i] {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
embed[align=baseline i], iframe[align=baseline i], img[align=baseline i],
|
||||
input[type=image i][align=baseline i], object[align=baseline i] {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
embed[align=texttop i], iframe[align=texttop i], img[align=texttop i],
|
||||
input[type=image i][align=texttop i], object[align=texttop i] {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
embed[align=absmiddle i], iframe[align=absmiddle i], img[align=absmiddle i],
|
||||
input[type=image i][align=absmiddle i], object[align=absmiddle i],
|
||||
embed[align=abscenter i], iframe[align=abscenter i], img[align=abscenter i],
|
||||
input[type=image i][align=abscenter i], object[align=abscenter i] {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
embed[align=bottom i], iframe[align=bottom i], img[align=bottom i],
|
||||
input[type=image i][align=bottom i], object[align=bottom i] {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
/* 15.5.4 The details and summary elements
|
||||
* https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue