Skip to content

Commit 6647042

Browse files
committed
Woocommerce: CSS
1 parent 92bf24f commit 6647042

12 files changed

+509
-112
lines changed

css/styles.css

+194-77
Large diffs are not rendered by default.

css/styles.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/styles.min.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scss/application.scss

+1
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,4 @@
8282

8383

8484

85+

scss/bootstrap/_alerts.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Base styles
77
// -------------------------
88

9-
.alert, .woocommerce-message {
9+
.alert, .woocommerce-message, .woocommerce-error, .woocommerce-info {
1010
padding: $alert-padding;
1111
margin-bottom: $line-height-computed;
1212
border: 1px solid transparent;
@@ -68,6 +68,7 @@
6868
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
6969
}
7070

71-
.alert-danger {
71+
.alert-danger, .woocommerce-error {
7272
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
7373
}
74+

scss/bootstrap/bootstrap-for-woocommerce.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
.table-hover, .shop_table {}
1212

1313
// forms
14-
.form-control, #coupon_code{}
1514

1615
// tabs
1716
.nav, .woocommerce-tabs .tabs {}
18-
.nav-tabs, .woocommerce-tabs .tabs {}
19-
17+
.nav-tabs, .woocommerce-tabs .tabs {}

scss/helpers/_gravityforms.scss

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
@extend .list-unstyled;
33
}
44

5-
.hidden_label > .control-label{
6-
display: none;
7-
}
8-
95
.form-horizontal{
106

117
.control-label{
@@ -34,10 +30,9 @@
3430

3531
&.ginput_container_name{
3632
span{
37-
display: block;
33+
display: inline-block;
3834
vertical-align: top;
3935
@media (min-width: $screen-sm-min) {
40-
display: inline-block;
4136
padding-right: 16px;
4237
margin-right: -4px;
4338
}

scss/helpers/_woocommerce.scss

+27-20
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ Buttons
1616
/**
1717
Big buttons
1818
*/
19-
.wc-proceed-to-checkout, .woocommerce-checkout-payment{
20-
.button{
21-
@include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
22-
@include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $btn-border-radius-large);
23-
display: block;
24-
width: 100%;
19+
.woocommerce{
20+
.wc-proceed-to-checkout, .woocommerce-checkout-payment{
21+
.button{
22+
@include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
23+
@include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $btn-border-radius-large);
24+
display: block;
25+
width: 100%;
26+
}
2527
}
2628
}
2729

30+
2831
/**
2932
Alerts / Messages
3033
*/
@@ -35,6 +38,14 @@ Alerts / Messages
3538
}
3639
}
3740

41+
.woocommerce-error{
42+
list-style: none;
43+
}
44+
45+
.woocommerce-info{
46+
padding: 0;
47+
}
48+
3849
/**
3950
Pagination
4051
*/
@@ -50,17 +61,10 @@ Pagination
5061

5162
.page-numbers {
5263
display: inline; // Remove list-style and block-level defaults
53-
@include list-unstyled;
54-
55-
li{
56-
display: inline-block;
57-
float: left;
58-
}
59-
60-
a,
61-
span {
64+
a,
65+
span {
6266
position: relative;
63-
//float: left; // Collapse white-space
67+
float: left; // Collapse white-space
6468
padding: $padding-base-vertical $padding-base-horizontal;
6569
line-height: $line-height-base;
6670
text-decoration: none;
@@ -70,17 +74,17 @@ Pagination
7074
margin-left: -1px;
7175
}
7276
&:first-child {
73-
//margin-left: 0;
77+
margin-left: 0;
7478
@include border-left-radius($border-radius-base);
7579
}
7680
&:last-child {
7781
@include border-right-radius($border-radius-base);
7882
}
7983
}
8084

81-
.page-numbers {
82-
a,
83-
span {
85+
.nav-links {
86+
a,
87+
span {
8488
&:hover,
8589
&:focus {
8690
color: $pagination-hover-color;
@@ -119,6 +123,9 @@ Forms
119123
}
120124
}
121125

126+
#calc_shipping_country, #calc_shipping_postcode{
127+
@extend .form-control;
128+
}
122129

123130

124131

scss/helpers/_woocommerce_checkout.scss

+36
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ All pages
1717
}
1818

1919

20+
#customer_login{
21+
.u-column1, .u-column2{
22+
@include make-md-column(6);
23+
}
24+
}
2025
}
2126

2227

@@ -27,6 +32,11 @@ Checkout
2732

2833
.woocommerce-checkout{
2934

35+
36+
.woocommerce-NoticeGroup{
37+
@include make-md-column(12);
38+
}
39+
3040
#customer_details{
3141

3242
}
@@ -225,12 +235,18 @@ Cart
225235

226236
.woocommerce-cart{
227237

238+
239+
#shipping_method{
240+
@include list-unstyled;
241+
}
242+
228243
.cart-collaterals{
229244
@include make-row;
230245
.cart_totals{
231246
@include make-sm-column-offset(6);
232247
@include make-sm-column(6);
233248
}
249+
margin-bottom: $line-height-computed;
234250
}
235251

236252
table.cart{
@@ -272,6 +288,11 @@ Cart
272288
width: auto;
273289
}
274290
}
291+
.checkout_coupon #coupon_code{
292+
display: inline-block;
293+
width: auto;
294+
}
295+
275296
.qty{
276297
width: 60px;
277298
@media (min-width: $screen-md-min) {
@@ -302,6 +323,18 @@ Cart
302323

303324
.woocommerce-account {
304325

326+
327+
#customer_login{
328+
.control-label, .form-input {
329+
@include make-sm-column(6);
330+
}
331+
.form-actions{
332+
//margin-left: 50%;
333+
@include make-sm-column(6);
334+
@include make-sm-column-offset(6);
335+
}
336+
}
337+
305338
.edit-account{
306339
.input-text{
307340
@extend .form-control;
@@ -334,6 +367,9 @@ Cart
334367
.woocommerce{
335368
@include make-row;
336369
}
370+
.woocommerce-error{
371+
@include make-sm-column(12);
372+
}
337373
.woocommerce-MyAccount-navigation{
338374
@include make-sm-column(3);
339375
}

scss/helpers/_woocommerce_widgets.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Cart Widget
200200
&.search {
201201
.site-search {
202202
position: absolute;
203-
bottom: -4em;
203+
bottom: -3em;
204204
left: 0;
205205
right: 0;
206206
@include transition(all,ease,.2s);

woocommerce/global/form-login.php

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
/**
3+
* Login form
4+
*
5+
* This template can be overridden by copying it to yourtheme/woocommerce/global/form-login.php.
6+
*
7+
* HOWEVER, on occasion WooCommerce will need to update template files and you
8+
* (the theme developer) will need to copy the new files to your theme to
9+
* maintain compatibility. We try to do this as little as possible, but it does
10+
* happen. When this occurs the version of the template file will be bumped and
11+
* the readme will list any important changes.
12+
*
13+
* @see https://docs.woocommerce.com/document/template-structure/
14+
* @author WooThemes
15+
* @package WooCommerce/Templates
16+
* @version 3.1.0
17+
*/
18+
19+
if ( ! defined( 'ABSPATH' ) ) {
20+
exit; // Exit if accessed directly
21+
}
22+
23+
if ( is_user_logged_in() ) {
24+
return;
25+
}
26+
27+
?>
28+
29+
<form class="woocomerce-form woocommerce-form-login form form-horizontal login" method="post" <?php echo ( $hidden ) ? 'style="display:none;"' : ''; ?>>
30+
<div class="panel panel-primary">
31+
<div class="panel-body">
32+
<?php do_action( 'woocommerce_login_form_start' ); ?>
33+
34+
<?php echo ( $message ) ? wpautop( wptexturize( $message ) ) : ''; ?>
35+
36+
<div class="form-group">
37+
<label for="username" class="control-label"><?php _e( 'Username or email', 'woocommerce' ); ?> <span class="required">*</span></label>
38+
<div class="form-input">
39+
<input type="text" class="form-control" name="username" id="username" />
40+
41+
</div>
42+
</div>
43+
<div class="form-group">
44+
<label for="password" class="control-label"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
45+
<div class="form-input">
46+
<input class="form-control" type="password" name="password" id="password" />
47+
</div>
48+
</div>
49+
50+
<?php do_action( 'woocommerce_login_form' ); ?>
51+
52+
<div class="form-group">
53+
<div class="form-actions">
54+
<?php wp_nonce_field( 'woocommerce-login' ); ?>
55+
<input type="submit" class="btn btn-primary" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>" />
56+
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ) ?>" />
57+
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">
58+
<input class="woocommerce-form__input woocommerce-form__input-checkbox btn btn-primary" name="rememberme" type="checkbox" id="rememberme" value="forever" />
59+
<span><?php _e( 'Remember me', 'woocommerce' ); ?></span>
60+
</label>
61+
</div>
62+
</div>
63+
64+
<div class="form-group">
65+
<div class="form-actions">
66+
<p class="lost_password">
67+
<a class="btn-link" href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?', 'woocommerce' ); ?></a>
68+
</p>
69+
</div>
70+
</div>
71+
72+
73+
<?php do_action( 'woocommerce_login_form_end' ); ?>
74+
</div>
75+
</div>
76+
77+
</form>
78+

0 commit comments

Comments
 (0)