Browse Source

Improved <kbd> line break (#3817)

* fix CSS

* improved
maTh 4 years ago
parent
commit
b563e4badb
2 changed files with 8 additions and 4 deletions
  1. 4 2
      p/themes/base-theme/template.css
  2. 4 2
      p/themes/base-theme/template.rtl.css

+ 4 - 2
p/themes/base-theme/template.css

@@ -74,12 +74,14 @@ sup {
 
 kbd {
 	background-color: #eee;
-	padding: 2px 4px;
+	padding: 2px 4px 2px 24px;
 	display: inline-block;
 	color: #333;
 	border: 1px solid #b4b4b4;
 	border-radius: 3px;
-	white-space: nowrap;
+	text-indent: -20px;
+	white-space: pre-wrap;
+	overflow-wrap: anywhere;
 }
 
 /*=== Images */

+ 4 - 2
p/themes/base-theme/template.rtl.css

@@ -74,12 +74,14 @@ sup {
 
 kbd {
 	background-color: #eee;
-	padding: 2px 4px;
+	padding: 2px 4px 2px 24px;
 	display: inline-block;
 	color: #333;
 	border: 1px solid #b4b4b4;
 	border-radius: 3px;
-	white-space: nowrap;
+	text-indent: -20px;
+	white-space: pre-wrap;
+	overflow-wrap: anywhere;
 }
 
 /*=== Images */