Skip to content

Commit

Permalink
feat: cleaning up some ui elements
Browse files Browse the repository at this point in the history
  • Loading branch information
laurelfulford committed May 23, 2024
1 parent 4a4fa4e commit fb896cd
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 106 deletions.
Binary file not shown.
93 changes: 0 additions & 93 deletions assets/newspack-ui/fonts/inter/OFL.txt

This file was deleted.

2 changes: 1 addition & 1 deletion assets/newspack-ui/scss/_modals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}
}

.newspack-ui__close {
.newspack-ui__modal__close {
margin: -6px -6px -6px 0; // Accounts for the header padding. TODO: Can this be improved to work w/variables?
}

Expand Down
2 changes: 1 addition & 1 deletion assets/newspack-ui/scss/elements/forms/_labels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
color: var( --newspack-ui-label-color );
display: block;
font-family: var( --newspack-ui-font-family);
font-size: var( --newspack-ui-font-size-s ) !important; // !important to override Newspack Theme.
font-size: var( --newspack-ui-font-size-s );
font-weight: 600;
line-height: var( --newspack-ui-line-height-s );
margin: 0 0 var( --newspack-ui-spacer-base );
Expand Down
33 changes: 29 additions & 4 deletions assets/newspack-ui/scss/elements/woocommerce/_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
margin-top: var( --newspack-ui-spacer-5 );
}


// Override checkout payment method box.
.wc_payment_method {

Expand Down Expand Up @@ -107,10 +108,11 @@

&.form-row {
display: flex;
gap: var(--newspack-ui-spacer-2);
align-items: flex-start;

input {
margin-right: var(--newspack-ui-spacer-2);
margin: 0;
}

label {
Expand All @@ -121,12 +123,16 @@
}
}

.newspack-cover-fees {
.newspack-cover-fees,
.woocommerce-SavedPaymentMethods-saveNew {
label {
color: var(--newspack-ui-color-neutral-60);
font-size: var( --newspack-ui-font-size-xs );
line-height: var( --newspack-ui-line-height-xs );
}

&::before {
display: none;
}
}
}

Expand All @@ -146,6 +152,13 @@
}
}

// WooCommerce Payments
#payment {
.payment_method_woocommerce_payments .testmode-info {
margin-bottom: 0;
}
}

// Stripe inputs
.wc-credit-card-form {
.form-row-wide {
Expand Down Expand Up @@ -195,7 +208,7 @@
// Woo Payments inputs
#wcpay-upe-element,
.wcpay-upe-element {
margin: var(--newspack-ui-spacer-5) 0;
margin: var(--newspack-ui-spacer-3) 0;
padding: 0;
}

Expand All @@ -217,6 +230,17 @@
margin-bottom: var( --newspack-ui-spacer-2 );
}
}

// Override label styles from theme
.woocommerce-billing-fields,
.woocommerce-account-fields,
.woocommerce-shipping-fields,
.woocommerce-additional-fields {
label {
font-size: var( --newspack-ui-font-size-s );
}

}
}

// Override billing details spacing.
Expand Down Expand Up @@ -279,6 +303,7 @@
margin-bottom: var(--newspack-ui-spacer-5);

h3 {
color: var( --newspack-ui-label-color );
margin-bottom: var( --newspack-ui-spacer-base );
}

Expand Down
8 changes: 1 addition & 7 deletions assets/newspack-ui/scss/variables/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
@font-face {
font-family: Inter;
font-display: swap;
src: url('/wp-content/plugins/newspack-plugin/assets/newspack-ui/fonts/inter/Inter-VariableFont_slnt,wght.ttf');
}

:root {
// Fonts - general
--newspack-ui-font-family: 'Inter', system-ui, sans-serif;
--newspack-ui-font-family: system-ui, sans-serif;
--newspack-ui-font-weight-strong: 600;

// Fonts - sizes
Expand Down

0 comments on commit fb896cd

Please sign in to comment.