Problem/Motivation

User themes can have something like font-size: 1vw; (just for instance) set on html tag, to have proportional scaling of all UI elements no matter which resolution of the screen.

Almost all sizes of everything related to Navigation module are based on --admin-toolbar-rem CSS variable, which is doing its job great. However we still have few UI elements with the px sizes set, or some where don't have sizes set at all (for instance logotype)

test

test

Steps to reproduce

1. Standard profile installation
2. Enable Navigation module
3. Then on any page try to zoom out or zoom in
4. Then add for instance font-size: 1vw; to the html tag and try to zoom out or zoom it again

I found 3 UI elements (could be more, but seems only 3, at least i didn't find anything else) where we have to set or replace sizes in rems:
1. Logotype
2. Dividing line between sections in navigation bar
3. Outlines/borders, hovers and focuses (to be checked for all interactive elements which does have these states with outlines)

Proposed resolution

1. Convert existing hardcoded px values into rems (using --admin-toolbar-rem css variable)
2. For the elements like logotype - add sizes

Issue fork drupal-3446611

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 3446611-not-all-ui Comparechanges, plain diff MR !8030
  • 2 hidden branches
  • 11.x Comparecompare
  • 3446611-ui-element Comparecompare

Comments

kostyashupenko created an issue. See original summary.

kostyashupenko’s picture

Issue summary: View changes
StatusFileSize
new4.32 MB
new5.59 MB

kostyashupenko’s picture

Version: 11.0.x-dev » 11.x-dev
kostyashupenko’s picture

Assigned: kostyashupenko » Unassigned
Status: Active » Needs review
StatusFileSize
new7.6 MB

*

kostyashupenko’s picture

Issue summary: View changes
kostyashupenko’s picture

Issue summary: View changes
kostyashupenko’s picture

Issue summary: View changes
kostyashupenko’s picture

kostyashupenko’s picture

MR is ready for review. In #5 i have uploaded wrong gif with the demonstration of results. Will upload correct gif later, but you can test in any way.

Gauravvvv made their first commit to this issue’s fork.

gauravvvv’s picture

I have updated leftover px value with variables.

kostyashupenko’s picture

StatusFileSize
new11.57 MB

RE #10
i'm attaching correct gif with the results

test

btw @Gauravvvv i think it is not required to change those px values, because if you will look to the context of the selector you will understand that the styles are used to hide visually an element.

Keeping on Needs review still

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

arunkumark made their first commit to this issue’s fork.

arunkumark changed the visibility of the branch 11.x to hidden.

arunkumark changed the visibility of the branch 3446611-ui-element to hidden.

arunkumark’s picture

Status: Needs work » Needs review

Updated the fork and ready for Review.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

ahsannazir made their first commit to this issue’s fork.

ahsannazir’s picture

Status: Needs work » Needs review

finnsky made their first commit to this issue’s fork.

finnsky’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, checked on all screen sizes and rem definitions.

Fixed 2 small bugs

1. scope of mobile expand button. now it is control-bar instead of top-bar
2. duplication of --admin-toolbar-top-bar-height variable in control-bar

That small bugs so i believe they can be applied as RTBC.

finnsky’s picture

If possible i would like to postpone it.

nod_’s picture

Title: Not all UI elements are following rems scaling » [PP-1] Not all UI elements are following rems scaling
Status: Reviewed & tested by the community » Postponed
Related issues: +#3458215: Migrate Toolbar button to SDC

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.