From 55b4a66c55d0fcc27b07f628179ddf02dc36c5ea Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Tue, 16 Oct 2012 13:34:01 +0000 Subject: [PATCH] Add button groups. see #21598, #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@22242 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/css/buttons.css | 43 +++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/wp-includes/css/buttons.css b/wp-includes/css/buttons.css index ffcfefb44d..12f330bd18 100644 --- a/wp-includes/css/buttons.css +++ b/wp-includes/css/buttons.css @@ -26,6 +26,7 @@ TABLE OF CONTENTS: 1.0 - Button Layouts 2.0 - Default Button Style 3.0 - Primary Button Style + 4.0 - Button Groups ---------------------------------------------------------------------------- */ @@ -37,6 +38,7 @@ TABLE OF CONTENTS: .button-primary, .button-secondary { display: inline-block; + vertical-align: middle; text-decoration: none; font-size: 12px; line-height: 17px; @@ -54,11 +56,13 @@ TABLE OF CONTENTS: white-space: nowrap; } -.button.button-large { +.button.button-large, +.button-group.button-large .button { padding: 0.4em 1.0em 0.5em; } -.button.button-small { +.button.button-small, +.button-group.button-small .button { padding: 0.15em 0.75em 0.17em; } @@ -218,3 +222,38 @@ TABLE OF CONTENTS: box-shadow: none !important; text-shadow: 0 -1px 0 rgba(0,0,0,0.1) !important; } + +/* ---------------------------------------------------------------------------- + 4.0 - Button Groups +---------------------------------------------------------------------------- */ + +.button-group { + display: inline-block; + white-space: nowrap; + font-size: 0; + vertical-align: middle; +} + +.button-group > .button { + position: relative; + display: inline-block; + border-radius: 0; + margin-right: -1px; + z-index: 10; +} + +.button-group > .button-primary { + z-index: 100; +} + +.button-group > .button:hover { + z-index: 20; +} + +.button-group > .button:first-child { + border-radius: 3px 0 0 3px; +} + +.button-group > .button:last-child { + border-radius: 0 3px 3px 0; +} \ No newline at end of file