Skip to content

Instantly share code, notes, and snippets.

@krisgholson
Last active January 8, 2024 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisgholson/01fc812a73080c21f35747e292434c12 to your computer and use it in GitHub Desktop.
Save krisgholson/01fc812a73080c21f35747e292434c12 to your computer and use it in GitHub Desktop.
shopify-notification-styles.css
/*manually extracted from style tag in shopify order confirmation email*/
body {
margin: 0;
}
h1 a:hover {
font-size: 30px;
color: #333;
}
h1 a:active {
font-size: 30px;
color: #333;
}
h1 a:visited {
font-size: 30px;
color: #333;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
.button__text:hover {
color: #fff;
text-decoration: none;
}
.button__text:active {
color: #fff;
text-decoration: none;
}
.button__text:visited {
color: #fff;
text-decoration: none;
}
a:hover {
color: #FF6C08;
}
a:active {
color: #FF6C08;
}
a:visited {
color: #FF6C08;
}
@media (max-width: 600px) {
.container {
width: 94% !important;
}
.main-action-cell {
float: none !important;
margin-right: 0 !important;
}
.secondary-action-cell {
text-align: center;
width: 100%;
}
.header {
margin-top: 20px !important;
margin-bottom: 2px !important;
}
.shop-name__cell {
display: block;
}
.order-number__cell {
display: block;
text-align: left !important;
margin-top: 20px;
}
.po-number__cell {
display: block;
text-align: left !important;
margin-top: 5px;
}
.button {
width: 100%;
}
.or {
margin-right: 0 !important;
}
.apple-wallet-button {
text-align: center;
}
.customer-info__item {
display: block;
width: 100% !important;
}
.spacer {
display: none;
}
.subtotal-spacer {
display: none;
}
}
/*manually extracted from inlined styles in shopify order confirmation email*/
table {
border-spacing: 0;
border-collapse: collapse;
}
table.body {
height: 100% !important;
width: 100% !important;
border-spacing: 0;
border-collapse: collapse;
}
table.header.row {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
margin: 40px 0 20px;
}
table.row {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
}
table.row.content {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
}
table.row.section {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
}
table.row.actions {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
margin-top: 20px;
}
table.container {
width: 560px;
text-align: left;
border-spacing: 0;
border-collapse: collapse;
margin: 0 auto;
}
table.button.main-action-cell {
border-spacing: 0;
border-collapse: collapse;
float: left;
margin-right: 15px;
}
table.link.secondary-action-cell {
border-spacing: 0;
border-collapse: collapse;
margin-top: 19px;
}
table.row.subtotal-lines {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
margin-top: 15px;
border-top-width: 1px;
border-top-color: #e5e5e5;
border-top-style: solid;
}
table.row.subtotal-table {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
margin-top: 20px;
}
table.row.subtotal-table.subtotal-table--total {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
margin-top: 20px;
border-top-width: 2px;
border-top-color: #e5e5e5;
border-top-style: solid;
}
table.row.footer {
width: 100%;
border-spacing: 0;
border-collapse: collapse;
border-top-width: 1px;
border-top-color: #e5e5e5;
border-top-style: solid;
}
tr.order-list__item {
width: 100%;
}
td {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
td.header__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
td.shop-name__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
td.order-number__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
text-transform: uppercase;
font-size: 14px;
color: #999;
}
td.content__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
padding-bottom: 40px;
border-width: 0;
}
td.empty-line {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
line-height: 0em;
}
td.actions__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
td.button__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
border-radius: 4px;
}
td.link__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
border-radius: 4px;
}
td.section__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
padding: 40px 0;
}
td.order-list__item__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
padding-bottom: 15px;
}
td.order-list__product-description-cell {
font-size: 16px;
font-weight: 600;
line-height: 1.4;
color: #555;
}
td.order-list__price-cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
white-space: nowrap;
}
td.subtotal-spacer {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
width: 40%;
}
td.subtotal-line__title {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
padding: 2px 0;
}
td.subtotal-line__value {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
padding: 2px 0;
}
td.subtotal-table__line {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
border-bottom-width: 1px;
border-bottom-color: #e5e5e5;
border-bottom-style: solid;
height: 1px;
padding: 0;
}
td.subtotal-table__small-space {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
height: 10px;
}
td.customer-info__item {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
padding-bottom: 40px;
width: 50%;
}
td.footer__cell {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
padding: 35px 0;
}
a {
font-size: 16px;
text-decoration: none;
color: #FF6C08;
}
a.button__text {
font-size: 16px;
text-decoration: none;
display: block;
color: #fff;
padding: 20px 25px;
}
span {
font-size: 14px;
margin-left: -4px;
}
span.order-number__text {
font-size: 16px;
}
span.order-list__item-title {
font-size: 16px;
font-weight: 600;
line-height: 1.4;
color: #555;
}
span.order-list__item-variant {
font-size: 14px;
color: #999;
}
span.order-list__item-discount-allocation {
font-size: 14px;
display: block;
line-height: 1.4;
margin: 1px 0 0;
}
span.subtotal-line__discount {
font-size: 16px;
margin-left: 5px;
}
span.subtotal-line__discount-title {
font-size: 16px;
margin-left: -4px;
}
span.total-discount--amount {
font-size: 16px;
color: #555;
}
h2 {
font-weight: normal;
font-size: 24px;
margin: 0 0 10px;
}
h3 {
font-weight: normal;
font-size: 20px;
margin: 0 0 25px;
}
h4 {
font-weight: 500;
font-size: 16px;
color: #555;
margin: 0 0 5px;
}
p {
color: #777;
line-height: 150%;
font-size: 16px;
margin: 0;
}
p.order-list__item-price {
color: #555;
line-height: 150%;
font-size: 16px;
font-weight: 600;
margin: 0 0 0 15px;
}
p.total-discount {
color: #777;
line-height: 1.1;
font-size: 16px;
margin: 10px 0 0;
}
p.disclaimer__subtext {
color: #999;
line-height: 150%;
font-size: 14px;
margin: 0;
}
del.order-list__item-original-price {
font-size: 14px;
display: block;
text-align: right;
color: #999;
}
img.order-list__product-image {
margin-right: 15px;
border-radius: 8px;
border: 1px solid #e5e5e5;
}
img.discount-tag-icon {
vertical-align: middle;
margin-right: 6px;
}
img.spacer {
min-width: 600px;
height: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment