diff --git a/core/includes/menu.inc b/core/includes/menu.inc index d28316b25cc8eac1098824511514605abad6a43c..bbc5138b394d325d85c475e6ea85873e4303802b 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -1654,18 +1654,16 @@ function theme_menu_local_task($variables) { */ function theme_menu_local_action($variables) { $link = $variables['element']['#link']; + $link += array( + 'href' => '', + 'localized_options' => array(), + ); + $link['localized_options']['attributes']['class'][] = 'button'; + $link['localized_options']['attributes']['class'][] = 'add'; $output = '
  • '; - if (isset($link['href'])) { - $output .= l($link['title'], $link['href'], isset($link['localized_options']) ? $link['localized_options'] : array()); - } - elseif (!empty($link['localized_options']['html'])) { - $output .= $link['title']; - } - else { - $output .= check_plain($link['title']); - } - $output .= "
  • \n"; + $output .= l($link['title'], $link['href'], $link['localized_options']); + $output .= ""; return $output; } diff --git a/core/modules/system/system.theme-rtl.css b/core/modules/system/system.theme-rtl.css index a8b5e0f39fd39ada9a8ef3524a554084fb9ce0a0..27b8ce715fba87c0d30da5614141c7a5d2265716 100644 --- a/core/modules/system/system.theme-rtl.css +++ b/core/modules/system/system.theme-rtl.css @@ -76,6 +76,20 @@ ul.menu { } /** + * RTL Styles for link buttons and action links. + */ +.action-links li:first-child { + margin-left: auto; + margin-right: 0; +} +a.button.add:before { + margin-left: 0; + margin-right: -0.1em; + padding-left: 0.2em; + padding-right: 0; +} + +/** * RTL Styles for system messages. */ diff --git a/core/modules/system/system.theme.css b/core/modules/system/system.theme.css index ad901eacec304b850dad9b2aef1fc12db3608311..6a4a64dabc1db4bff5dd6a2fce72a657fb466fe5 100644 --- a/core/modules/system/system.theme.css +++ b/core/modules/system/system.theme.css @@ -335,6 +335,34 @@ ul.tabs { } /** + * Styles for link buttons and action links. + */ +.action-links { + list-style: none; + padding: 0; + margin: 1em 0; +} +.action-links li { + display: inline-block; + margin: 0 0.3em; +} +.action-links li:first-child { + margin-left: 0; /* LTR */ +} +a.button { + display: inline-block; + line-height: 160%; + padding: 0.2em 0.5em 0.3em; + text-decoration: none; +} +a.button.add:before { + content: '+'; + font-weight: 900; + margin-left: -0.1em; /* LTR */ + padding-right: 0.2em; /* LTR */ +} + +/** * Styles for system messages. */ div.messages { diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css index 94ac77510719c7d52a5b5c74bcf22d953910e815..9e781eb1ff423fe144fcb3e79f1c3ce9ec662b37 100644 --- a/core/themes/bartik/css/style.css +++ b/core/themes/bartik/css/style.css @@ -1030,19 +1030,9 @@ div.tabs { border-bottom: none; border-radius: 5px; } -ul.action-links { - list-style: none; - margin: 5px; - padding: 0.5em 1em; -} -ul.action-links li { - display: inline-block; - margin-left: 10px; -} ul.action-links li a { padding-left: 15px; - background: url(../images/add.png) no-repeat left center; - margin: 0 10px 0 0; + margin: 0; } /* ---------------- Messages ----------------- */ diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css index 9c43ac9e4434c773cfbca6714418e1598a6f565c..bcdec1bd9566945e202a0b63327f104eb9f44a02 100644 --- a/core/themes/seven/style.css +++ b/core/themes/seven/style.css @@ -709,20 +709,41 @@ select.form-select:focus { .js input.throbbing { background-position: 100% -16px; } -ul.action-links { - margin: 1em 0; - padding: 0 20px 0 20px; /* LTR */ - list-style-type: none; - overflow: hidden; -} -ul.action-links li { - float: left; /* LTR */ - margin: 0 1em 0 0; /* LTR */ +a.button.add { + background: #1078d8; + background-image: -webkit-linear-gradient(top, #419ff1, #1076d5); + background-image: -moz-linear-gradient(top, #419ff1, #1076d5); + background-image: -o-linear-gradient(top, #419ff1, #1076d5); + background-image: linear-gradient(to bottom, #419ff1, #1076d5); + border: 1px solid #0048c8; + border-radius: .4em; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); + color: #fff; + font-size: 1em; + line-height: normal; + margin: 0; + padding: .5em 1em; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); +} +a.button.add:focus, +a.button.add:hover { + background-color: #419cf1; + background-image: -webkit-linear-gradient(top, #59abf3, #2a90ef); + background-image: -moz-linear-gradient(top, #59abf3, #2a90ef); + background-image: -o-linear-gradient(top, #59abf3, #2a90ef); + background-image: linear-gradient(to bottom, #59abf3, #2a90ef); + color: #fff; } -ul.action-links a { - padding-left: 15px; /* LTR */ - background: transparent url(images/add.png) no-repeat 0 center; - line-height: 30px; +a.button.add:active { + background-color: #0e69be; + background-image: -webkit-linear-gradient(top, #0e69be, #2a93ef); + background-image: -moz-linear-gradient(top, #0e69be, #2a93ef); + background-image: -o-linear-gradient(top, #0e69be, #2a93ef); + background-image: -ms-linear-gradient(top, #0e69be, #2a93ef); + background-image: linear-gradient(to bottom, #0e69be, #2a93ef); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); } /**