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

Bug - Footer styling in FF, changing theme cause error with icons and html attribute #584

Merged

Conversation

mmexvr
Copy link
Member

@mmexvr mmexvr commented Sep 15, 2020

Describe pull-request
Describe what the pull-request is about

  • Added fallback for themes without version in the attribute on the HTML element('scania-theme: 1.1.1'), causing the error in console when switching from scania-theme or starting without a theme.
  • Added fallback support for themes without icon packages, even with a another theme
  • Solves issue with footer in VUE not appending correct styling in FireFox. It set the styling as undenfied in inside the style tag in the footer component.
  • Change the scania-theme attribute, to show which theme and

Solving issue
Add which issue this pull-request solves by adding # plus the number of the issue (for example #123)
Fixes: #582 fixes: #583

How to test
Add description how to test if possible

  1. Start a vue application for example our example in FF
  2. Look at the styling of the footer
  3. Try it all browser(new and old edge, FF...)

Seconding fix

  1. Start up the sdds application, try it all browser
  2. Switch theme between both no theme and for example MAN
  3. No error should be shown now, just a warning if there is no icons using another theme

Screenshots
If applicable, add screenshots to help explain

Additional context
Add any other context about the pull-request here.

… and html attribute bug

- Added fallback for themes without version in the attribute on the HTML element
- Added fallback support for themes without icon packages
- Solves issue with footer in VUE not appending correct styling in FireFox
- This commit is related with the issue in SDDS regarding icons
@mmexvr mmexvr added the bug Something isn't working label Sep 15, 2020
@mmexvr mmexvr self-assigned this Sep 15, 2020
@mmexvr mmexvr marked this pull request as draft September 15, 2020 13:50
@mmexvr mmexvr changed the title Fixed bug with footer styling , bug changing theme causing a icon bug… Bug - Footer styling in FF, changing theme cause error with icons and html attribute Sep 15, 2020
@mmexvr mmexvr marked this pull request as ready for review September 16, 2020 07:41

// This is used by browsers with support for shadowdom
// If the browser has support for adoptedStyleSheet (Chromium)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous statement is actually correct. Because el.shadowRoot is only exist for browser that support shadow DOM. And adaptedStyleSheet is part of that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition check if the browser has support specifically for adoptedStyletSheet not shadowDOM.

ShadowDOM is supported by a lot browsers but not a lot of browsers support adoptedStyleSheet API.

@helloimela helloimela merged commit f399af2 into master Sep 16, 2020
@helloimela helloimela deleted the bug/fix_footer_and_fallback_for_icon_and_attribute branch September 16, 2020 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug - Switching Theme cause errors in the console Footer is broken in Firefox
2 participants