pico/scss/content/_embedded.scss

54 lines
1.4 KiB
SCSS
Raw Normal View History

2022-10-23 10:47:50 +07:00
@use "sass:map";
2022-10-22 13:11:51 +07:00
@use "../settings" as *;
2022-10-23 10:47:50 +07:00
@if map.get($modules, "content/embedded") {
/**
* Embedded content
*/
// Reboot based on :
// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
// - sanitize.css v13.0.0 | CC0 1.0 Universal | github.com/csstools/sanitize.css
//
// Change the alignment on media elements in all browsers (opinionated)
2024-01-25 01:42:54 +07:00
#{$parent-selector} :where(audio, canvas, iframe, img, svg, video) {
2022-10-23 10:47:50 +07:00
vertical-align: middle;
}
// Add the correct display in IE 9-
2024-01-25 01:42:54 +07:00
#{$parent-selector} audio,
#{$parent-selector} video {
2022-10-23 10:47:50 +07:00
display: inline-block;
}
// Add the correct display in iOS 4-7
2024-01-25 01:42:54 +07:00
#{$parent-selector} audio:not([controls]) {
2022-10-23 10:47:50 +07:00
display: none;
height: 0;
}
// Remove the border on iframes in all browsers (opinionated)
2024-01-25 01:42:54 +07:00
#{$parent-selector} :where(iframe) {
2022-10-23 10:47:50 +07:00
border-style: none;
}
// 1. Remove the border on images inside links in IE 10.
// 2. Responsive by default
2024-01-25 01:42:54 +07:00
#{$parent-selector} img {
2022-10-23 10:47:50 +07:00
max-width: 100%; // 2
height: auto; // 2
border-style: none; // 1
}
// Change the fill color to match the text color in all browsers (opinionated)
2024-01-25 01:42:54 +07:00
#{$parent-selector} :where(svg:not([fill])) {
2022-10-23 10:47:50 +07:00
fill: currentColor;
}
// Hide the overflow in IE
2024-01-25 01:42:54 +07:00
#{$parent-selector} svg:not(:root) {
2022-10-23 10:47:50 +07:00
overflow: hidden;
}
2022-10-15 23:22:12 +07:00
}