Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Replace xmp with code tag

Krzysztof Białogłowicz4e7ddd3d492f
diff --git a/saleor/static/scss/dashboard/layouts/_style-guide.scss b/saleor/static/scss/dashboard/layouts/_style-guide.scss
index c9303a6695..05f9a7528c 100644
--- a/saleor/static/scss/dashboard/layouts/_style-guide.scss
+++ b/saleor/static/scss/dashboard/layouts/_style-guide.scss
@@ -76,9 +76,11 @@
margin: 0;
padding-bottom: 5px;
}
- xmp {
+ code {
+ display: block;
line-height: 1;
padding: 10px;
+ margin: 10px 0;
background: #f2f2f2;
border: solid 1px $grey-color;
@media only screen and (max-width: $small-screen-up) {
diff --git a/templates/dashboard/styleguide/index.html b/templates/dashboard/styleguide/index.html
index 422f32e39c..e40171ef93 100644
--- a/templates/dashboard/styleguide/index.html
+++ b/templates/dashboard/styleguide/index.html
@@ -242,16 +242,16 @@
<h4>
{% trans "Text align" context "helpers subtitle in style guide" %}
</h4>
- <xmp><p class="left-align">Text left aligned</p></xmp>
- <xmp><p class="right-align">Text right aligned</p></xmp>
- <xmp><p class="center-align">Text center aligned</p></xmp>
+ <code>&lt;p class=&quot;left-align&quot;&gt;Text left aligned&lt;/p&gt;</code>
+ <code>&lt;p class=&quot;right-align&quot;&gt;Text right aligned&lt;/p&gt;</code>
+ <code>&lt;p class=&quot;center-align&quot;&gt;Text center aligned&lt;/p&gt;</code>
</div>
<div class="section">
<h4>
{% trans "Floats" context "Floats subtitle in style guide" %}
</h4>
- <xmp><div class="left">Add float:left</div></xmp>
- <xmp><div class="right">Add float:right</div></xmp>
+ <code>&lt;div class=&quot;left&quot;&gt;Add float:left&lt;/div&gt;</code>
+ <code>&lt;div class=&quot;right&quot;&gt;Add float:right&lt;/div&gt;</code>
</div>
<div class="section">
<h4>
@@ -321,37 +321,37 @@
</tbody>
</table>
</div>
- <xmp><div class="hide"></div></xmp>
+ <code>&lt;div class=&quot;hide&quot;&gt;&lt;/div&gt;</code>
</div>
<div class="section">
<h4>
{% trans "No margin" context "Helpers subtitle in style guide" %}
</h4>
- <xmp><div class="no-margin">Remove all margins</div></xmp>
+ <code>&lt;div class=&quot;no-margin&quot;&gt;Remove all margins&lt;/div&gt;</code>
</div>
<div class="section">
<h4>
{% trans "Labels" context "Helpers subtitle in style guide" %}
</h4>
- <xmp><span class="label"></span></xmp>
+ <code>&lt;span class=&quot;label&quot;&gt;&lt;/span&gt;</code>
<span class="label">Example label class</span>
- <xmp><span class="label label-danger"></span></xmp>
+ <code>&lt;span class=&quot;label label-danger&quot;&gt;&lt;/span&gt;</code>
<span class="label label-danger">Example label class</span>
- <xmp><span class="label label-success"></span></xmp>
+ <code>&lt;span class=&quot;label label-success&quot;&gt;&lt;/span&gt;</code>
<span class="label label-success">Example label class</span>
</div>
<div class="section">
<h4>
{% trans "Currency" context "Helpers subtitle in style guide" %}
</h4>
- <xmp><span class="currency"></span></xmp>
+ <code>&lt;span class=&quot;currency&quot;&gt;&lt;/span&gt;</code>
<span class="currency">USD</span>
</div>
<div class="section">
<h4>
{% trans "Text large" context "Helpers subtitle in style guide" %}
</h4>
- <xmp><p class="text-lg"></p></xmp>
+ <code>&lt;p class=&quot;text-lg&quot;&gt;&lt;/p&gt;</code>
<p>
{% trans "Regular example text" context "example text in style guide" %}
</p>
@@ -413,7 +413,7 @@
<div class="card-content">
<div class="section">
<h4>{% trans "Usage" context "Icons subtitle in style guide" %}</h4>
- <xmp><i class="material-icons"></i></xmp>
+ <code>&lt;i class=&quot;material-icons&quot;&gt;&lt;/i&gt;</code>
</div>
<div class="section">
<h4>{% trans "Used icons" context "Icons subtitle in style guide" %}:</h4>