Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[create-theme]: #777

Closed
1 task
Lisiowen opened this issue Nov 16, 2024 · 1 comment
Closed
1 task

[create-theme]: #777

Lisiowen opened this issue Nov 16, 2024 · 1 comment
Labels
new-theme Submit a theme to be added to the theme library

Comments

@Lisiowen
Copy link

Name

Simple Centred Address

Description

Centres the URL bar text and hides buttons when unfocused.

Homepage

No response

Image

https://imgur.com/a/BRvNxWD

Type

  • JSON Color Theme

Theme Styles

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

@media (-moz-bool-pref: "theme.sca.enable_centered_text") {
/* Centre text */
#urlbar-input {
  text-align: center !important;
}
}

/* Hide icons */
#page-action-buttons:has(#theme-sca[theme-sca-icon_visibility="quick"]),
#tracking-protection-icon-container:has(#theme-sca[theme-sca-icon_visibility="quick"]),
#identity-box:has(#theme-sca[theme-sca-icon_visibility="quick"]) {
  opacity: 0;
}

#page-action-buttons:has(#theme-sca[theme-sca-icon_visibility="smooth"]),
#tracking-protection-icon-container:has(#theme-sca[theme-sca-icon_visibility="smooth"]),
#identity-box:has(#theme-sca[theme-sca-icon_visibility="smooth"]) {
  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

{
    "property": "theme.sca.enable_centred_text",
    "label": "Centred Text",
    "type": "checkbox",
    "defaultValue": true
}

{
    "property": "theme.sca.icon_visibility",
    "label": "Icon Visibility",
    "type": "dropdown",
    "placeholder": "Fade In On Hover",
    "defaultValue": "smooth",
    "options": [
      {
        "label": "Always Visible",
        "value": "always"
      },
      {
        "label": "Visible On Hover",
        "value": "quick"
      },
      {
        "label": "Fade In On Hover",
        "value": "smooth"
      }
    ]
}
@Lisiowen Lisiowen added the new-theme Submit a theme to be added to the theme library label Nov 16, 2024
Copy link
Contributor

Error creating theme

Sorry about that! There was an error creating the theme. Please try again or contact the maintainers for help.

Preferences file is invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-theme Submit a theme to be added to the theme library
Projects
None yet
Development

No branches or pull requests

1 participant