-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patterns: Add category selector to pattern creation modal (#55024)
--------- Co-authored-by: Kai Hao <kai@kaihao.dev>
- Loading branch information
Showing
3 changed files
with
103 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,36 @@ | ||
.patterns-menu-items__convert-modal { | ||
z-index: z-index(".patterns-menu-items__convert-modal"); | ||
|
||
// Fix the modal width to prevent added categories from stretching the modal. | ||
[role="dialog"] > [role="document"] { | ||
width: 350px; | ||
} | ||
|
||
.patterns-menu-items__convert-modal-categories { | ||
max-width: 300px; | ||
width: 100%; | ||
position: relative; | ||
min-height: 40px; | ||
} | ||
.components-form-token-field__suggestions-list { | ||
position: absolute; | ||
box-sizing: border-box; | ||
z-index: 1; | ||
background-color: $white; | ||
// Account for the border width of the token field. | ||
width: calc(100% + 2px); | ||
left: -1px; | ||
min-width: initial; | ||
border: 1px solid var(--wp-admin-theme-color); | ||
border-top: none; | ||
box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color); | ||
border-bottom-left-radius: 2px; | ||
border-bottom-right-radius: 2px; | ||
} | ||
} | ||
|
||
.patterns-create-modal__name-input input[type="text"] { | ||
min-height: 34px; | ||
// Match the minimal height of the category selector. | ||
min-height: 40px; | ||
// Override the default 1px margin-x. | ||
margin: 0; | ||
} |