From: Eric Morris Date: Wed, 13 Nov 2013 19:32:19 +0000 (-0800) Subject: Add new button syntax X-Git-Tag: v1.0.2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e1582d5314af7ba906ccabdc18028c666b2f0bc;p=thirdparty%2Ffoundation%2Ffoundation-emails.git Add new button syntax --- diff --git a/Gruntfile.js b/Gruntfile.js index bd7ca1ab..befa1fd0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -100,7 +100,7 @@ module.exports = function(grunt) { }, watch: { docs: { - files: ['docs/docs.php', 'docs/**/*.php', 'docs/**/*.html'], + files: ['docs/docs.php', 'docs/**/*.php', 'docs/**/*.html', 'css/*.css'], tasks: ['shell:makeStage', 'includes:docsDev', 'shell:testDocs'], options: { livereload: true, diff --git a/css/ink.css b/css/ink.css index 74ba0fbb..39cf6e06 100644 --- a/css/ink.css +++ b/css/ink.css @@ -311,7 +311,7 @@ small { a { color: #2ba6cb; - text-decoration: none !important; + text-decoration: none; } a:hover { @@ -363,6 +363,163 @@ td.panel { /* Buttons */ +table.button, +table.tiny-button, +table.small-button, +table.medium-button, +table.large-button { + width: 100%; + overflow: hidden; +} + +table.button td, +table.tiny-button td, +table.small-button td, +table.medium-button td, +table.large-button td { + display: block; + width: auto !important; + text-align: center; + background: #2ba6cb; + border: 1px solid #2284a1; + color: #ffffff; + padding: 8px 0; +} + +table.tiny-button td { + padding: 5px 0 4px; +} + +table.small-button td { + padding: 8px 0 7px; +} + +table.medium-button td { + padding: 12px 0 10px; +} + +table.large-button td { + padding: 21px 0 18px; +} + +table.button td a, +table.tiny-button td a, +table.small-button td a, +table.medium-button td a, +table.large-button td a { + font-weight: bold; + text-decoration: none; + font-family: Helvetica, Arial, sans-serif; + color: #ffffff; + font-size: 16px; +} + +table.tiny-button td a { + font-size: 12px; + font-weight: normal; +} + +table.small-button td a { + font-size: 16px; +} + +table.medium-button td a { + font-size: 20px; +} + +table.large-button td a { + font-size: 24px; +} + +table.button:hover td, +table.button:visited td, +table.button:active td { + background: #2795b6 !important; +} + +table.button:hover td a, +table.button:visited td a, +table.button:active td a { + color: #fff !important; +} + +table.button:hover td, +table.tiny-button:hover td, +table.small-button:hover td, +table.medium-button:hover td, +table.large-button:hover td { + background: #2795b6 !important; +} + +table.button:hover td a, +table.button:active td a, +table.button td a:visited, +table.tiny-button:hover td a, +table.tiny-button:active td a, +table.tiny-button td a:visited, +table.small-button:hover td a, +table.small-button:active td a, +table.small-button td a:visited, +table.medium-button:hover td a, +table.medium-button:active td a, +table.medium-button td a:visited, +table.large-button:hover td a, +table.large-button:active td a, +table.large-button td a:visited { + color: #ffffff !important; +} + +table.secondary td { + background: #e9e9e9; + border-color: #d0d0d0; + color: #555; +} + +table.secondary td a { + color: #555; +} + +table.secondary:hover td { + background: #d0d0d0 !important; + color: #555; +} + +table.secondary:hover td a, +table.secondary td a:visited, +table.secondary:active td a { + color: #555 !important; +} + +table.success td { + background: #5da423; + border-color: #457a1a; +} + +table.success:hover td { + background: #457a1a !important; +} + +table.alert td { + background: #c60f13; + border-color: #970b0e; +} + +table.alert:hover td { + background: #970b0e !important; +} + +table.radius td { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +table.round td { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} + .button table, .tiny-button table, .small-button table, diff --git a/docs/components/buttons.php b/docs/components/buttons.php index 1c1bfb5c..2666ce54 100644 --- a/docs/components/buttons.php +++ b/docs/components/buttons.php @@ -82,7 +82,7 @@
-

The buttons works (without :hover effects) in most major email clients.

+

The buttons are unavailable in Microsoft Outlook (2007, 2010, 2013). A fix is on the way.

Toggle Full Table @@ -117,8 +117,8 @@ Outlook (2007, 2010, 2013) - - + + Visible, but not clickable. A fix is currently in the works. Outlook (2011) diff --git a/docs/examples/buttons.html b/docs/examples/buttons.html index 4cf029f7..1a0d7636 100644 --- a/docs/examples/buttons.html +++ b/docs/examples/buttons.html @@ -27,46 +27,22 @@
- + -
- - - - - -
- - - - - - -
- .tiny-button -
-
- -
- -
- - +
@@ -76,19 +52,17 @@
- - +
- .radius.button + .tiny-button
-
- +
@@ -103,19 +77,17 @@ - - +
- - +
- .primary.button + .small-button
-
- +
@@ -123,21 +95,19 @@
- - +
- .small-button + .medium-button
-
+ - +
@@ -145,21 +115,24 @@
- - +
- .round.button + .large-button
-
+
+ + + + - -
@@ -167,26 +140,19 @@
- - +
- .secondary.button + .secondary
-
- - -
- +
@@ -196,19 +162,17 @@
- - +
- .medium-button + .alert
-
- +
@@ -227,15 +191,13 @@ @@ -249,15 +211,13 @@
- - +
- .alert.button + .success
-
- - +
- .large-button + .radius
-
- - +
- .success.button + .round
-