Skip to content

Commit e7c0e0e

Browse files
authored
movebadge code into base.css (Shopify#313)
1 parent f9304b9 commit e7c0e0e

8 files changed

+15
-24
lines changed

assets/base.css

+15
Original file line numberDiff line numberDiff line change
@@ -2097,3 +2097,18 @@ details-disclosure > details {
20972097
overflow: auto;
20982098
}
20992099
}
2100+
2101+
.badge {
2102+
border: 1px solid transparent;
2103+
border-radius: 4rem;
2104+
display: inline-block;
2105+
font-size: 1.2rem;
2106+
letter-spacing: 0.1rem;
2107+
line-height: 1;
2108+
padding: 0.6rem 1.3rem;
2109+
text-align: center;
2110+
background-color: rgb(var(--color-badge-background));
2111+
border-color: rgba(var(--color-badge-border), var(--alpha-badge-border));
2112+
color: rgb(var(--color-foreground));
2113+
word-break: break-word;
2114+
}

assets/component-badge.css

-14
This file was deleted.

sections/collage.liquid

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{{ 'collage.css' | asset_url | stylesheet_tag }}
22
{{ 'component-card.css' | asset_url | stylesheet_tag }}
3-
{{ 'component-badge.css' | asset_url | stylesheet_tag }}
43
{{ 'component-price.css' | asset_url | stylesheet_tag }}
54

65
<link rel="stylesheet" href="{{ 'component-deferred-media.css' | asset_url }}" media="print" onload="this.media='all'">

sections/featured-collection.liquid

-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
{{ 'component-product-grid.css' | asset_url | stylesheet_tag }}
44

55
<link rel="stylesheet" href="{{ 'component-slider.css' | asset_url }}" media="print" onload="this.media='all'">
6-
<link rel="stylesheet" href="{{ 'component-badge.css' | asset_url }}" media="print" onload="this.media='all'">
76
<link rel="stylesheet" href="{{ 'template-collection.css' | asset_url }}" media="print" onload="this.media='all'">
87

98
<noscript>{{ 'component-slider.css' | asset_url | stylesheet_tag }}</noscript>
10-
<noscript>{{ 'component-badge.css' | asset_url | stylesheet_tag }}</noscript>
119
<noscript>{{ 'template-collection.css' | asset_url | stylesheet_tag }}</noscript>
1210

1311
{%- liquid

sections/main-collection-product-grid.liquid

-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
{{ 'component-price.css' | asset_url | stylesheet_tag }}
55
{{ 'component-product-grid.css' | asset_url | stylesheet_tag }}
66

7-
<link rel="preload" href="{{ 'component-badge.css' | asset_url }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
87
<link rel="preload" href="{{ 'component-rte.css' | asset_url }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
98

10-
<noscript>{{ 'component-badge.css' | asset_url | stylesheet_tag }}</noscript>
119
<noscript>{{ 'component-rte.css' | asset_url | stylesheet_tag }}</noscript>
1210

1311
<script src="{{ 'collection-filters-form.js' | asset_url }}" defer="defer"></script>

sections/main-product.liquid

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{% comment %}theme-check-disable TemplateLength{% endcomment %}
22
{{ 'section-main-product.css' | asset_url | stylesheet_tag }}
33
{{ 'component-accordion.css' | asset_url | stylesheet_tag }}
4-
{{ 'component-badge.css' | asset_url | stylesheet_tag }}
54
{{ 'component-price.css' | asset_url | stylesheet_tag }}
65
{{ 'component-rte.css' | asset_url | stylesheet_tag }}
76
{{ 'component-slider.css' | asset_url | stylesheet_tag }}

sections/main-search.liquid

-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
{{ 'component-price.css' | asset_url | stylesheet_tag }}
33
{{ 'component-product-grid.css' | asset_url | stylesheet_tag }}
44

5-
<link rel="stylesheet" href="{{ 'component-badge.css' | asset_url }}" media="print" onload="this.media='all'">
65
<link rel="stylesheet" href="{{ 'component-search.css' | asset_url }}" media="print" onload="this.media='all'">
76

8-
<noscript>{{ 'component-badge.css' | asset_url | stylesheet_tag }}</noscript>
97
<noscript>{{ 'component-search.css' | asset_url | stylesheet_tag }}</noscript>
108

119
<style>

sections/product-recommendations.liquid

-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
<link rel="stylesheet" href="{{ 'component-badge.css' | asset_url }}" media="print" onload="this.media='all'">
21
<link rel="stylesheet" href="{{ 'component-card.css' | asset_url }}" media="print" onload="this.media='all'">
32
<link rel="stylesheet" href="{{ 'component-price.css' | asset_url }}" media="print" onload="this.media='all'">
43
<link rel="stylesheet" href="{{ 'component-product-grid.css' | asset_url }}" media="print" onload="this.media='all'">
54
<link rel="stylesheet" href="{{ 'section-product-recommendations.css' | asset_url }}" media="print" onload="this.media='all'">
65

7-
<noscript>{{ 'component-badge.css' | asset_url | stylesheet_tag }}</noscript>
86
<noscript>{{ 'component-card.css' | asset_url | stylesheet_tag }}</noscript>
97
<noscript>{{ 'component-price.css' | asset_url | stylesheet_tag }}</noscript>
108
<noscript>{{ 'component-product-grid.css' | asset_url | stylesheet_tag }}</noscript>

0 commit comments

Comments
 (0)