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.

[Ionic v4] Attribut no-margin doesn't set --margin variables to zero

See original GitHub issue

Ionic Info @ionic/angular: “4.0.0-alpha.11”

Describe the Bug Using the attributes no-margin on an element doesn’t set the css4 variables --margin zero

Steps to Reproduce For example:

 <ion-button no-margin no-padding>Something</ion-button>

no-margin will be generate as

 ion-app [no-margin] {
    margin: 0;
 }

where no-padding will be correctly generated as

[no-padding] {
   padding: 0;
   --padding-start: 0;
   --padding-end: 0;
   --padding-top: 0;
   --padding-bottom: 0;       
}

Expected output

 ion-app [no-margin] {
    margin: 0;
   --margin-start: 0;
   --margin-end: 0;
   --margin-top: 0;
   --margin-bottom: 0;  
 }

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
peterpeterparkercommented, Jul 24, 2018

Tested, I could confirm the fix in v4.0.0-alpha.12, thx 👍

1reaction
brandyscarneycommented, Jul 23, 2018

@peterpeterparker Thanks 🙂 They’re related and hopefully we’ll solve them both at once but I’ll leave this open to make sure it gets fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Ionic v4] Attribut no-margin doesn't set --margin ... - GitHub
Ionic Info @ionic/angular: "4.0.0-alpha.11" Describe the Bug Using the attributes no-margin on an element doesn't set the css4 variables ...
Read more >
CSS Utilities: Classes for Text/Element Alignment or Modification
Ionic Framework provides a set of CSS utility classes that can be used on any element in ... .ion-no-margin, margin: 0, Applies no...
Read more >
How to remove the padding around ion-item? - Stack Overflow
try to add an id = 'ion-overrides' or whatever you want to call it to your body element and then in your scss...
Read more >
Using the CSS Star Selector to Zero Out Margins and Paddings
Using the CSS Star Selector to Zero Out Margins and Paddings. You can run over default browser styles with * { margin: 0;...
Read more >
Social sharing component in Ionic 5 - Mobile & Web apps
If you want to learn more about how to create Ionic Apps — you can go through our Beginners blog. ... <div no-margin...
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