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.

How to override the padding of the shellbar?

See original GitHub issue

Is this a bug, enhancement, or feature request?

Question

Briefly describe your proposal.

I would like to override the padding of the shellbar. When I inspected the html code, the code was looking like this:

<top-bar _ngcontent-xat-c0 _nghost-xat-c1>
  <fd-shellbar _ngcontent-xat-c1>
    <div class="fd-shellbar">...</div>
  </fd-shellbar>
</top-bar>

The div seems to generated and contains all the shellbar content. The css class fd-shellbar is coming from luigi.css and contains all the css including the padding of the shellbar. In luigi.css the padding for the shellbar is defined like this:

@media (min-width:320px) {
  .fd-shellbar {
    padding: 4px 8px
  }
}

@media (min-width:600px) {
  .fd-shellbar {
    padding: 4px 16px
  }
}

@media (min-width:1024px) {
  .fd-shellbar {
    padding: 4px 32px
  }
}

@media (min-width:1440px) {
   .fd-shellbar {
    padding: 4px 32px
}

@media (min-width:1920px) {
  .fd-shellbar {
    padding: 4px 32px
  }
}

Because of that I’ve defined my own @media entries in my scss file like…

@media (min-width:320px) {
  .fd-shellbar {
    padding: 4px
  }
}

@media (min-width:600px) {
  .fd-shellbar {
    padding-left: 6px;
    padding-top: 4px;
    padding-bottom: 4px;
    padding-right: 8px
  }
}

...

…but they have been ignored. Is there anyway how I can override those entries? In general, I can change the predefined css from luigi.css. I’ve added the following entry…

.fd-shellbar__logo {
  display: inline-block;
}

…to my scss file and it was recognized and display was switched from ‘flex’ to ‘inline-block’. I can also add successfully @media entries to elements which does not have any @media yet. E. g. …

@media (min-width:1000px) {
  fd-shellbar-logo {
    margin-right: 100px;
  }
}

is also recognized and works. Did I something wrong in regard to the padding of the shellbar or is it not allowed/possible to change it?

BR Lukas

Which versions of Angular and Fundamental NGX are affected? (If this is a feature request, use current version.)

If this is a bug, please provide steps for reproducing it.

Please provide relevant source code if applicable.

Is there anything else we should know?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kistllcommented, Oct 16, 2019

Hi @JKMarkowski, Switching the class name from .fd-shell-bar to .fd-shellbar helped. Now, I am capable of overwriting media entries. Thx a lot for your help. BR Lukas

0reactions
JKMarkowskicommented, Oct 15, 2019

Hello, you should change class name .fd-shell-bar to .fd-shellbar 😃 Hope it will help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adapt components with Popover responsive paddings #4872
Check the affected components on Desktop and Mobile and fix paddings if necessary. If the listed components below are fine in terms of...
Read more >
SAP Fiori / Components / Shellbar - Primary ⋅ Storybook
Shellbar should always be placed inside the shell layout container. ... it is completely responsive by default with margins and padding already built...
Read more >
Launchpad Shell Bar - Fiori Design Guidelines
The launchpad shell bar is the uppermost section of the SAP Fiori launchpad. It is always visible to give users access to various...
Read more >
padding: 0; border: 0; css styles from main body css for ul li
So how can i override the margin: 0;padding: 0; border: 0; , so that i can get the list formatted easily. Removing padding:0;...
Read more >
ShellBar - UI5 Web Components - SAP
The ui5-shellbar is meant to serve as an application header and includes numerous built-in features, such as: logo, profile image/icon, title, search field, ......
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