zen-browser / theme-store

🎨 Theme repository for @zen-browser!
https://zen-browser.github.io/theme-store/themes.json
MIT License
130 stars 38 forks source link

[create-theme]: Simple Centred Address #780

Closed Lisiowen closed 2 hours ago

Lisiowen commented 2 hours ago

Name

Simple Centred Address

Description

Centres the URL bar text and hides buttons when unfocused.

Homepage

No response

Image

https://i.postimg.cc/MpLDZKtv/img.png

Type

Theme Styles

/* ----- Search Bar Idle ----- */

/* Centre text */
#urlbar-input {
  text-align: center !important;
}

/* Hide icons */

#page-action-buttons,
#tracking-protection-icon-container,
#identity-box {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ----- Search Bar Hover ----- */

/* Reveal icons*/
#urlbar:hover #page-action-buttons,
#urlbar:hover #tracking-protection-icon-container,
#urlbar:hover #identity-box {
  opacity: 1;
}

/* ----- Search Bar Focus ----- */

/* Revert text */
#urlbar[focused=""] #urlbar-input {
  text-align: left !important;
}

/* ----- Button Menu Opened ----- */

/* Keep buttons/menu visible */
#page-action-buttons:has(#star-button-box[open="true"])
#tracking-protection-icon-container[open="true"],
#identity-box:has(#identity-icon-box[open="true"]) {
  opacity: 1;
}

Readme

chrome.css notates what each block does. The text-align: center is only applied when the urlbar is unfocused to keep the modification simple.

Preferences

No response

github-actions[bot] commented 2 hours ago

Thank you for your contribution! :tada:

Your theme has been successfully submitted. The maintainers will review it and get back to you soon.

Here are some details about your submission:

If you have any questions or need help, feel free to ask in the comments below or in the PR.