Skip to content

Commit

Permalink
overlay styling
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Feb 8, 2017
1 parent df5d2f9 commit b57d0a2
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 38 deletions.
11 changes: 3 additions & 8 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
.woocommerce-cart-tab a {
display: block; }

body .site:before {
body:before {
content: "";
display: block;
position: fixed;
Expand All @@ -144,14 +144,9 @@ body .site:before {
opacity: 0;
visibility: hidden; }

body.woocommerce-cart-tab-is-visible {
.woocommerce-cart-tab-is-visible {
overflow: hidden; }
body.woocommerce-cart-tab-is-visible .site:before {
-webkit-transform: translateX(0);
-moz-transform: translateX(0);
-ms-transform: translateX(0);
-o-transform: translateX(0);
transform: translateX(0);
.woocommerce-cart-tab-is-visible:before {
opacity: 1;
visibility: visible; }

Expand Down
45 changes: 20 additions & 25 deletions assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -155,34 +155,29 @@ $cart_width: 320px;
}

body {
.site {
&:before {
content: "";
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(#000,.4);
z-index: 9999999;
@include transition(all cubic-bezier(.11,.51,.54,.9) .5s);
cursor: pointer;
opacity: 0;
visibility: hidden;
}
&:before {
content: "";
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(#000,.4);
z-index: 9999999;
@include transition(all cubic-bezier(.11,.51,.54,.9) .5s);
cursor: pointer;
opacity: 0;
visibility: hidden;
}
}

&.woocommerce-cart-tab-is-visible {
overflow: hidden;
.woocommerce-cart-tab-is-visible {
overflow: hidden;

.site {
&:before {
@include transform(translateX(0));
opacity: 1;
visibility: visible;
}
}
&:before {
opacity: 1;
visibility: visible;
}
}

Expand Down
2 changes: 1 addition & 1 deletion cart-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: WooCommerce Cart Tab
* Plugin URI: http://jameskoster.co.uk/tag/cart-tab/
* Version: 1.0.0
* Version: 1.1.0
* Description: Displays a sitewide link to the cart which reveals the cart contents on hover.
* Author: jameskoster
* Tested up to: 4.7.1
Expand Down
6 changes: 3 additions & 3 deletions languages/woocommerce-cart-tab.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
# This file is distributed under the same license as the WooCommerce Cart Tab package.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Cart Tab 1.0.0\n"
"Project-Id-Version: WooCommerce Cart Tab 1.1.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-cart-"
"tab\n"
"POT-Creation-Date: 2017-02-08 11:07:12+00:00\n"
"POT-Creation-Date: 2017-02-08 17:55:32+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"

#: includes/cart-tab-templates.php:53
#: includes/cart-tab-templates.php:59
msgid "Your Cart"
msgstr ""

Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: jameskoster
Tags: woocommerce, ecommerce, cart
Requires at least: 4.4
Tested up to: 4.7.1
Stable tag: 1.0.0
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -44,6 +44,11 @@ Thanks! Please fork the repo on <a href="https://github.com/jameskoster/woocomme

== Changelog ==

= 1.1.0 - 08/02/2017 =
* New - Cart tab is now hidden when the cart is empty.
* Tweak - Overlay styling.
* Localisation - updated .pot file.

= 1.0.0 - 26/01/2017 =
* New - The cart tab now opens when an add to cart button on a shop page is clicked.
* New - Cart tab opens on click rather than hover.
Expand Down

0 comments on commit b57d0a2

Please sign in to comment.