Skip to content

bext: fix styles conflict on GitLab

Created by: taras-yemets

Closes #32462 (closed)

Notes on implementation

State Screenshot Note
Browser extension disabled Screenshot from 2022-03-14 11-34-23 Screenshot from 2022-03-14 11-34-31 Background is defined as var(--gray-10, #fafafa). Variable --gray-10 is not defined and fallback color #fafafa is used.
Browser extension enabled Screenshot from 2022-03-14 11-35-16 - client/branded/src/global-styles/colors.scss defining --gray-10 is loaded (it's imported by client/browser/src/app.scss)
- As there is no other rule overriding --gray-10 value, the one from client/branded/src/global-styles/colors.scss is used
Suggested fix Screenshot from 2022-03-14 11-53-01 Set --gray-10 value to equal the initial fallback value #fafafa for GitLab.

Implementation weak spot

Possible solution

  • Inject browser extension stylesheets above the code host ones.
  • Prefix browser extension CSS variables to avoid conflicts.

Test plan

  • sg run bext
  • enable extension for browser
  • open GitLab project board and ensure that the styles issue is no longer reproduced

Merge request reports

Loading