Bläddra i källkod

Varia: Add left/right margins to iframes and other embeds to better support responsiveness.

Allan Cole 5 år sedan
förälder
incheckning
cd5184e39e
3 ändrade filer med 21 tillägg och 26 borttagningar
  1. 7 8
      varia/sass/components/content/_entry-content.scss
  2. 7 9
      varia/style-rtl.css
  3. 7 9
      varia/style.css

+ 7 - 8
varia/sass/components/content/_entry-content.scss

@@ -38,14 +38,13 @@
 	}
 
 	// Overwrite iframe embeds that have inline styles.
-	> iframe[style] {
-
-		margin: #{map-deep-get($config-global, "spacing", "vertical")} 0 !important;
-		max-width: 100% !important;
-
-		@include media(mobile) {
-			max-width: #{map-deep-get($config-global, "spacing", "vertical")} !important;
-		}
+	> iframe,
+	> iframe[style],
+	> fb\:post {
+		display: block !important;
+		margin-left: auto !important;
+		margin-right: auto !important;
+		overflow: scroll;
 	}
 
 	// Page links

+ 7 - 9
varia/style-rtl.css

@@ -3210,15 +3210,13 @@ body:not(.fse-enabled) .footer-menu a {
 	text-decoration: none;
 }
 
-.entry-content > iframe[style] {
-	margin: 32px 0 !important;
-	max-width: 100% !important;
-}
-
-@media only screen and (min-width: 560px) {
-	.entry-content > iframe[style] {
-		max-width: 32px !important;
-	}
+.entry-content > iframe,
+.entry-content > iframe[style],
+.entry-content > fb\:post {
+	display: block !important;
+	margin-right: auto !important;
+	margin-left: auto !important;
+	overflow: scroll;
 }
 
 .entry-attachment {

+ 7 - 9
varia/style.css

@@ -3229,15 +3229,13 @@ body:not(.fse-enabled) .footer-menu a {
 	text-decoration: none;
 }
 
-.entry-content > iframe[style] {
-	margin: 32px 0 !important;
-	max-width: 100% !important;
-}
-
-@media only screen and (min-width: 560px) {
-	.entry-content > iframe[style] {
-		max-width: 32px !important;
-	}
+.entry-content > iframe,
+.entry-content > iframe[style],
+.entry-content > fb\:post {
+	display: block !important;
+	margin-left: auto !important;
+	margin-right: auto !important;
+	overflow: scroll;
 }
 
 .entry-attachment {