Skip to content

Commit

Permalink
more styles
Browse files Browse the repository at this point in the history
  • Loading branch information
iandunn committed Apr 14, 2023
1 parent a2798ed commit e988175
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
7 changes: 6 additions & 1 deletion wp-content/mu-plugins/assets/locale-switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@
accessibleAutocomplete.enhanceSelectElement( {
selectElement: localeSelect,
showAllValues: true,
// displayMenu: 'overlay' might be useful
placeholder: 'Search languages [glass]', // only shown when clear current manually
// might need to dynamically set `.autocomplete__input--show-all-values.autocomplete__input--focused { value }` field to set visible placeholder text


// displayMenu: 'overlay',// might be useful
// autoselect: false


// Submit the form.
onConfirm: function( localeName ) {
// Find the selected locale code.
Expand Down
25 changes: 21 additions & 4 deletions wp-content/themes/twentyseventeen-wp20/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,20 @@ body:not(.title-tagline-hidden) .site-branding-text {

#wp20-locale-switcher {
border: none;
width: 100vw;
position: absolute;
left: -50vw;

/* need more dynamic positioning, these are just hardcoded to get rough sense of things */
}

.autocomplete__menu {
width: 100vw;
position: absolute;
left: -50vw;
text-align: left;
top: 80px;
/* need more dynamic positioning, these are just hardcoded to get rough sense of things */
}

.wp20-locale-switcher-container select {
Expand All @@ -789,18 +803,21 @@ input[type="text"].autocomplete__input--show-all-values {
.autocomplete__input--show-all-values.autocomplete__input--focused {
cursor: text;
border: 1px solid blue none;
/* covered up by focus outline? */
/* covered up by focus outline?
blue not final color , just to identify*/
}

.autocomplete__hint {
position: relative;
top: 8px;
border: none;
background-color: var(--wp20--color--active-menu);
position: static;
padding-right: 40px;
cursor: pointer;
font-weight: 400;
text-align: right;
}



@media screen and (max-width: 48em) {
.wp20-locale-switcher-container .select2-container {
width: 100% !important; /* override selectWoo rule. locale-swithcer.js L24. */
Expand Down

0 comments on commit e988175

Please sign in to comment.