Skip to content
Snippets Groups Projects
Unverified Commit 61ebd080 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3200370 by mherchel, imalabya, KapilV, Indrajith KB, lauriii, alexpott,...

Issue #3200370 by mherchel, imalabya, KapilV, Indrajith KB, lauriii, alexpott, ressa: Fix Olivero's drop-button style to conform with new form styles
parent 51a82dbf
No related branches found
No related tags found
18 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1896Issue #2940605: Can only intentionally re-render an entity with references 20 times,!1101Issue #2412669 by claudiu.cristea, Julfabre, sidharrell, catch, daffie,...,!1039Issue #2556069 by claudiu.cristea, bnjmnm, lauriii, pfrenssen, Tim Bozeman,...,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!1012Issue #3226887: Hreflang on non-canonical content pages,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links,!594Put each entity type table into a details element on admin/config/regional/content-language,!592Issue #2957953: Editing menus user-experience has regressed,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!512Issue #3207771: Menu UI node type form documentation points to non-existent function,!485Sets the autocomplete attribute for username/password input field on login form.,!449Issue #2784233: Allow multiple vocabularies in the taxonomy filter,!231Issue #2671162: summary text wysiwyg patch working fine on 9.2.0-dev,!43Resolve #3173180: Add UI for 'loading' html attribute to images,!30Issue #3182188: Updates composer usage to point at ./vendor/bin/composer
......@@ -127,6 +127,7 @@
--color--gray-45: #afb8be; /* Gray medium 2 */
--color--gray-50: #9ea0a1; /* Black 4 */
--color--gray-70: #d7e1e8; /* Gray light */
--color--gray-75: #e3e3e5;
--color--gray-80: #e7edf1; /* Gray light 1 */
--color--gray-90: #f1f4f7;
--color--gray-95: #f7f9fa; /* Gray light 2 */
......
......@@ -7,99 +7,190 @@
/**
* @file
* Drop button specific styles.
* Dropbutton styles.
*/
.dropbutton-wrapper.open {
position: relative;
z-index: 100; /* Ensure this appears above all other dropbuttons. */
filter: drop-shadow(0 2px 2px #e3e3e5);
}
[dir="ltr"] .dropbutton-widget {
padding-right: 1.6875rem;
}
[dir="rtl"] .dropbutton-widget {
padding-left: 1.6875rem;
}
.dropbutton-widget {
overflow: hidden;
border: solid 1px #fff;
border-radius: 0.1875rem;
position: relative;
width: 12.5rem;
height: 1.6875rem;
border-radius: 0.1875rem
}
.dropbutton {
background-color: #0d77b5;
@supports ((width: -webkit-max-content) or (width: max-content)) {
.dropbutton-widget {
width: -webkit-max-content;
width: max-content
}
}
[dir="ltr"] .dropbutton-single .dropbutton-widget {
padding-right: 0;
}
[dir="rtl"] .dropbutton-single .dropbutton-widget {
padding-left: 0;
}
[dir="ltr"] .dropbutton {
margin-left: 0;
}
[dir="rtl"] .dropbutton {
margin-right: 0;
}
[dir="ltr"] .dropbutton {
padding-left: 0;
}
.js .dropbutton-widget .dropbutton {
overflow: visible;
[dir="rtl"] .dropbutton {
padding-right: 0;
}
.dropbutton-action {
.dropbutton {
height: 1.6875rem;
margin-top: 0;
margin-bottom: 0;
list-style: none;
font-size: 0.875rem;
line-height: 1.125rem
}
[dir="ltr"] .dropbutton-action a {
padding-left: 1.125rem;
[dir="ltr"] .dropbutton-toggle button {
right: 0;
}
[dir="rtl"] .dropbutton-toggle button {
left: 0;
}
.dropbutton-toggle button {
position: absolute;
top: 0;
display: flex;
align-items: center;
justify-content: center;
width: 1.6875rem;
height: 1.6875rem;
padding: 0;
cursor: pointer;
border-color: transparent;
border-radius: 0 0.1875rem 0.1875rem 0; /* LTR */
background: #e3e3e5
}
[dir="rtl"] .dropbutton-action a {
padding-right: 1.125rem;
.dropbutton-toggle button:focus {
outline: solid 2px #0d77b5;
outline-offset: -2px;
}
.dropbutton-toggle button:before {
display: block;
width: 0.5625rem;
height: 0.5625rem;
content: "";
transform: translateY(-25%) rotate(45deg);
border-right: solid 2px #0d77b5;
border-bottom: solid 2px #0d77b5;
}
[dir="rtl"] .dropbutton-toggle button {
border-radius: 0.1875rem 0 0 0.1875rem;
}
[dir="ltr"] .dropbutton-action a {
padding-right: 1.125rem;
[dir="ltr"] .dropbutton-action:first-child {
margin-right: 2px;
}
[dir="rtl"] .dropbutton-action a {
padding-left: 1.125rem;
[dir="rtl"] .dropbutton-action:first-child {
margin-left: 2px;
}
.dropbutton-action:first-child {
border: solid 1px transparent;
border-radius: 0.1875rem 0 0 0.1875rem; /* LTR */
background: #e3e3e5;
}
.dropbutton-action a {
padding-top: 0.28125rem;
padding-bottom: 0.28125rem;
display: flex;
align-items: center;
margin-bottom: -2px; /* Account for borders. */
padding: 0 0.5625rem;
text-decoration: none;
color: #fff
color: #313637;
font-weight: 600
}
.dropbutton-action a:hover {
background-color: #2494db;
.dropbutton-action a:focus {
border: solid 2px #0d77b5;
outline: 0
/* Negate specific IE rules. */
}
@supports (outline-offset: -2px) {
.dropbutton-action a:focus {
outline: 2px solid #53b0eb;
outline-offset: 2px;
background-color: #2494db;
border: 0;
outline: solid 2px #0d77b5;
outline-offset: -1px /* Overlap parent container by 1px. */
}
}
.open .dropbutton-action:not(:last-child) {
border-bottom: solid 1px #fff;
}
.dropbutton-single .dropbutton-action:first-child {
border-right: solid 1px transparent; /* LTR */
border-radius: 0.1875rem;
}
.js .dropbutton-action a:focus {
outline: 2px solid #53b0eb;
}
.dropbutton-single .dropbutton-action a {
justify-content: center;
}
[dir="ltr"] .dropbutton-toggle {
border-left: 1px solid #fff;
}
[dir="rtl"] .dropbutton-action:first-child {
border: solid 1px transparent;
border-radius: 0 0.1875rem 0.1875rem 0;
}
[dir="rtl"] .dropbutton-toggle {
border-right: 1px solid #fff;
}
[dir="rtl"] .dropbutton-single .dropbutton-action:first-child {
border: solid 1px transparent;
}
.dropbutton-toggle {
background-color: #0d77b5
.secondary-action {
visibility: hidden;
width: calc(100% + 1.6875rem);
border-right: 1px solid #e3e3e5;
border-left: 1px solid #e3e3e5;
background: #fff
}
.dropbutton-toggle:hover {
background-color: #2494db;
.secondary-action:last-child {
border-bottom: 1px solid #e3e3e5;
}
.dropbutton-toggle button:focus {
outline: solid 2px #53b0eb;
outline-offset: 2px;
background-color: #2494db;
.dropbutton-wrapper.open .dropbutton-toggle button:before {
transform: translateY(25%) rotate(225deg);
}
.dropbutton-arrow {
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
border-top-color: #fff;
}
.dropbutton-wrapper.open .dropbutton-widget {
border-radius: 0.1875rem 0.1875rem 0 0;
}
.dropbutton-multiple.open .dropbutton-arrow {
border-bottom-color: #fff;
}
.dropbutton-wrapper.open .secondary-action {
visibility: visible;
}
/**
* @file
* Drop button specific styles.
* Dropbutton styles.
*/
@import "../base/variables.pcss.css";
:root {
--dropbutton--height: var(--sp1-5);
--dropbutton--bg-color: var(--color--gray-75);
--dropbutton--border-color: var(--color--blue-20);
}
.dropbutton-wrapper.open {
position: relative;
z-index: 100; /* Ensure this appears above all other dropbuttons. */
filter: drop-shadow(0 2px 2px var(--dropbutton--bg-color));
}
.dropbutton-widget {
overflow: hidden;
border: solid 1px var(--color--white);
position: relative;
width: 200px;
height: var(--dropbutton--height);
padding-inline-end: var(--dropbutton--height);
border-radius: var(--border-radius);
@supports (width: max-content) {
width: max-content;
}
}
.dropbutton-single .dropbutton-widget {
padding-inline-end: 0;
}
.dropbutton {
background-color: var(--color--blue-20);
height: var(--dropbutton--height);
margin-block: 0;
margin-inline-start: 0;
padding-inline-start: 0;
list-style: none;
font-size: var(--font-size-s);
}
.dropbutton-toggle button {
position: absolute;
top: 0;
inset-inline-end: 0;
display: flex;
align-items: center;
justify-content: center;
width: var(--dropbutton--height);
height: var(--dropbutton--height);
padding: 0;
cursor: pointer;
border-color: transparent;
border-radius: 0 var(--border-radius) var(--border-radius) 0; /* LTR */
background: var(--dropbutton--bg-color);
&:focus {
outline: solid 2px var(--dropbutton--border-color);
outline-offset: -2px;
}
&:before {
display: block;
width: var(--sp0-5);
height: var(--sp0-5);
content: "";
transform: translateY(-25%) rotate(45deg);
border-right: solid 2px var(--dropbutton--border-color);
border-bottom: solid 2px var(--dropbutton--border-color);
}
}
.js .dropbutton-widget .dropbutton {
overflow: visible;
[dir="rtl"] .dropbutton-toggle button {
border-radius: var(--border-radius) 0 0 var(--border-radius);
}
.dropbutton-action {
font-size: var(--font-size-s);
line-height: var(--line-height-s);
&:first-child {
margin-inline-end: 2px;
border: solid 1px transparent;
border-radius: var(--border-radius) 0 0 var(--border-radius); /* LTR */
background: var(--dropbutton--bg-color);
}
& a {
padding-block: var(--sp0-25);
padding-inline-start: var(--sp1);
padding-inline-end: var(--sp1);
display: flex;
align-items: center;
margin-bottom: -2px; /* Account for borders. */
padding: 0 9px;
text-decoration: none;
color: var(--color--white);
&:hover {
background-color: var(--color--blue-50);
}
color: var(--color--gray-10);
font-weight: 600;
&:focus {
outline: 2px solid var(--color--blue-70);
outline-offset: 2px;
background-color: var(--color--blue-50);
border: solid 2px var(--dropbutton--border-color);
outline: 0;
/* Negate specific IE rules. */
@supports (outline-offset: -2px) {
border: 0;
outline: solid 2px var(--dropbutton--border-color);
outline-offset: -1px; /* Overlap parent container by 1px. */
}
}
}
}
.open .dropbutton-action:not(:last-child) {
border-block-end: solid 1px var(--color--white);
}
.dropbutton-single .dropbutton-action {
&:first-child {
border-right: solid 1px transparent; /* LTR */
border-radius: var(--border-radius);
}
.js .dropbutton-action a:focus {
outline: 2px solid var(--color--blue-70);
& a {
justify-content: center;
}
}
.dropbutton-toggle {
border-inline-start: 1px solid var(--color--white);
background-color: var(--color--blue-20);
&:hover {
background-color: var(--color--blue-50);
[dir="rtl"] {
& .dropbutton-action:first-child {
border: solid 1px transparent;
border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
& button:focus {
outline: solid 2px var(--color--blue-70);
outline-offset: 2px;
background-color: var(--color--blue-50);
& .dropbutton-single .dropbutton-action:first-child {
border: solid 1px transparent;
}
}
.dropbutton-arrow {
inset-inline: 0;
margin-inline: auto;
border-top-color: var(--color--white);
.secondary-action {
visibility: hidden;
width: calc(100% + var(--dropbutton--height));
border-right: 1px solid var(--dropbutton--bg-color);
border-left: 1px solid var(--dropbutton--bg-color);
background: var(--color--white);
&:last-child {
border-bottom: 1px solid var(--dropbutton--bg-color);
}
}
.dropbutton-multiple.open .dropbutton-arrow {
border-bottom-color: var(--color--white);
.dropbutton-wrapper.open {
& .dropbutton-toggle button:before {
transform: translateY(25%) rotate(225deg);
}
& .dropbutton-widget {
border-radius: var(--border-radius) var(--border-radius) 0 0;
}
& .secondary-action {
visibility: visible;
}
}
......@@ -41,6 +41,10 @@ libraries-override:
css/components/ajax-progress.module.css: css/components/ajax-progress.module.css
css/components/autocomplete-loading.module.css: css/components/autocomplete-loading.module.css
core/drupal.checkbox: false
core/drupal.dropbutton:
css:
component:
misc/dropbutton/dropbutton.css: css/components/dropbutton.css
core/drupal.vertical-tabs:
css:
component:
......@@ -58,8 +62,6 @@ libraries-extend:
- olivero/dialog.off_canvas
core/drupal.progress:
- olivero/progress
core/drupal.dropbutton:
- olivero/dropbutton
layout_discovery/onecol:
- olivero/layout_discovery_section
layout_discovery/twocol_bricks:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment