Skip to content

Commit

Permalink
Merge pull request #1347 from plone/petschki-relateditems-styling
Browse files Browse the repository at this point in the history
Fix `pat-relateditems` styling when inside a modal.
  • Loading branch information
petschki authored Oct 20, 2023
2 parents e6e58d2 + e5d5aa9 commit ed30701
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/pat/relateditems/relateditems.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@
width: 100%;

.select2-container {
/* generalize from .form-control */
border: var(--bs-border-width) solid var(--bs-border-color);
padding: 0.325rem 0.5rem;
min-width: 100%;
border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
&.select2-dropdown-open {
border-radius:0;
border-bottom-style:none;
}
}


.toolbar {
background-color: var(--bs-secondary-bg);
border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0 ;

.mode-selector {
display: inline-block;
Expand Down Expand Up @@ -39,6 +49,12 @@
}

.pat-relateditems-dropdown {

&.select2-drop-active {
border-color: var(--bs-border-color);
box-shadow: none;
}

.select2-results {
max-height: 950px;

Expand Down Expand Up @@ -92,8 +108,18 @@

&.select2-container-multi {
.select2-choices {
border: none;
background: none;

.select2-search-field input {
padding:0;
}

.select2-search-choice {
background-image: none;
background-color: var(--bs-gray-100);
border-color:var(--bs-border-color);
box-shadow: none;
margin: 0.2em;
padding: 0;
// make choices list compact:
Expand All @@ -111,6 +137,12 @@
}
}
}

&.select2-container-active {
.select2-choices {
border:none;
}
}
}
}

Expand Down

0 comments on commit ed30701

Please sign in to comment.