question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: collapsible header: main + inactive header does not have a background color

See original GitHub issue

Bug Report

Ionic version:

[x] 5.0.0-dev.202002041730.fbcf48c

Current behavior: When using collapsible headers on iOS, the main header cannot have a a background color when it is in inactive state, because the opacity of its toolbar is set to 0 and the header itself does not have a background-color:

https://github.com/ionic-team/ionic/blob/215d55f1ebeb93988b513c5869faae14d1d51919/core/src/components/header/header.tsx#L106

While this works well when the root --ion-background-color and --ion-toolbar-background are the same color, it prevents from using a different color for toolbars because it will look really strange:

Main header inactive: Screenshot 2020-02-05 at 15 41 26

Main header active: Screenshot 2020-02-05 at 15 42 12

Expected behavior: Toolbars in inactive headers can have a background color.

Steps to reproduce:

  • clone sample application
  • npm i
  • ionic serve

Related code: A sample application via GitHub

Ionic info:

Ionic:

   Ionic CLI                     : 6.0.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.0-dev.202002041730.fbcf48c
   @angular-devkit/build-angular : 0.900.0-rc.14
   @angular-devkit/schematics    : 9.0.0-rc.14
   @angular/cli                  : 9.0.0-rc.14
   @ionic/angular-toolkit        : 2.1.2

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v12.4.0 (/usr/local/bin/node)
   npm    : 6.11.3
   OS     : macOS Catalina

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
liamdebeasicommented, Feb 6, 2020

Glad to hear the issue is resolved! This has been resolved via https://github.com/ionic-team/ionic/pull/20388 and will be available in an upcoming release of Ionic Framework.

1reaction
DavidStrauszcommented, Feb 6, 2020

@liamdebeasi Yes perfect, thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: collapsible header: main + inactive header does not have ...
Expected behavior: Toolbars in inactive headers can have a background color. Steps to reproduce: clone sample application; npm i; ionic serve.
Read more >
Colors - Bootstrap
Background color ​​ Anchor components will darken on hover, just like the text classes. Background utilities do not set color , so in...
Read more >
A grid header background color changes from no fill to white ...
In a grid header that has no fill color, the fill color changes to white when the grid headers are locked in MicroStrategy...
Read more >
border-color - CSS: Cascading Style Sheets - MDN Web Docs
The border-color property may be specified using one, two, three, or four values. When one value is specified, it applies the same color...
Read more >
How To Add Active Class To Current Element - W3Schools
background -color: #f1f1f1; ... Get the container element ... If you do not have an active class set on the button element to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found