Skip to content

[5.0] Rename media manager CSS Vars and move to dedicated file#41903

Merged
HLeithner merged 1 commit intojoomla:5.0-devfrom
wilsonge:media-manager-css-vars
Sep 26, 2023
Merged

[5.0] Rename media manager CSS Vars and move to dedicated file#41903
HLeithner merged 1 commit intojoomla:5.0-devfrom
wilsonge:media-manager-css-vars

Conversation

@wilsonge
Copy link
Copy Markdown
Contributor

@wilsonge wilsonge commented Sep 23, 2023

Summary of Changes

This implements the naming conventions agreed on in the maintainers last meeting. Not sure it's been published yet so attached below for those wondering:

We aim for a hierarchy for css variables, we want to go from blocks to more specific use cases. E.G. 

--modal-border-color: red;
--overlay-bg-color: #e2e2e2; 
--standard-font-color: #020202;

If it is for a specific part of Joomla, we prefix the value with the area, e.g.

--com-media-overlay-bg: var(--overlay-bg-color, ‘#fff’);
--mod-articles-font-color: var(--standard-font-color, ‘#000’);
--calendar-bg-color: var(--standard-bg-color);  // This is for fields such as the calendar field where they aren't specific to anb area in core

If a view is loaded in a modal then overrides should be applied at that level using existing classes rather than on :root e.g.

.modal.view-media-grid {
  --com-media-overlay-bg: orange;
}

Additionally it adds a CSS var that I missed when moving all the variables into the media manager _variables file and moves com_media ones into a dedicated file as this seemed to be preferred when comparing the media and calendar implementations.

Testing Instructions

No visible changes

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.0-dev labels Sep 23, 2023
@wilsonge wilsonge changed the title Rename media manager CSS Vars and move to dedicated file [5.0] Rename media manager CSS Vars and move to dedicated file Sep 23, 2023
@HLeithner
Copy link
Copy Markdown
Member

computer says no, please fix cs

@wilsonge wilsonge force-pushed the media-manager-css-vars branch from ae9d661 to 08bb6fa Compare September 25, 2023 18:21
@wilsonge
Copy link
Copy Markdown
Contributor Author

Fixed CS and rebased

@HLeithner HLeithner merged commit 6c817bd into joomla:5.0-dev Sep 26, 2023
@HLeithner
Copy link
Copy Markdown
Member

Thx

@wilsonge wilsonge deleted the media-manager-css-vars branch September 26, 2023 08:37
@wilsonge wilsonge added this to the Joomla! 5.0 milestone Sep 26, 2023
HLeithner pushed a commit to HLeithner/joomla-cms that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants