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.

feat: allow to change min-width of ion-segment-button

See original GitHub issue

Feature Request

Ionic version: [x] 4.x

Describe the Feature Request I would like to change the min-width of a ion-segment-button, and now there is hard-coded value on .button-native (90px for md and 70px for ios) that prevents any changes from outside.

When I change min-width on ion-segment-button it only changes the width of the container, but .button-native stays larger, which causes the icon to be uncentered and also the ripple effect becomes wrong :

ion-segment-button {
    min-width: 48px;
}

Describe Preferred Solution Adding variable --min-width to ion-segment-button and use it for .button-native would resolve this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
SvenBudakcommented, May 27, 2020

Any news on this? Btw i ask for v5. (becuase in topic is v4 tagged) we was forced to implement material lib just to use <mat-tab> because this issue… I think webcomponents are still not ready for use in production before there is a way to overwrite all default styles.

You never know. Today everything is good, tomorrow the customer comes and wants something changed. Then you have to explain to him that things that have been going on since the invention of CSS are suddenly no longer possible because of webcomponents.

3reactions
leono286commented, May 12, 2020

I agree on “scrolling is just bad UI” when you only have some icons and just 6 items to show. In my case scrolling is not required whatsoever. Any fix/workaround on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic 5 Segment Button Width not adjusting with label width
I have the same code in ionic 4 and it is fine, the segment width adjusting with content. Is there a solution of...
Read more >
Ionic 3.x - QuickStart - Plunker
ID=function(e){var t=e.replace(Z,ee);return function(e){return e. ... minWidth,o=s. ... ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.
Read more >
Incident Response - Hybrid Analysis
ACCEPT. Toggle navigation ... Accept: text/html, application/xhtml+xml, */* ... Adding or removing controls * * To change the controls in the array, ...
Read more >
implement iOS 13 segment with animation (#19036 ...
feat (segment): implement iOS 13 segment with animation (#19036 ... Changes Closes #18663 ... ion-segment-button,prop,checked,boolean,false,false,false.
Read more >
Comparing v4.11.0...v4.11.2 · ionic-team/ionic-framework · GitHub
Comparing changes. Choose two branches to see what's changed or to start a new pull request. If you need to, you can also...
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