Button border-width sizing not matching
See original GitHub issueBug Report
Ionic version: [x] 4.x
Current behavior: If the ion-button’s fill is set to outline, the border-width is set to 2, while if it is set to fill, the width is 1 or 0 depending on which border. If the style is changed at runtime, the size of the button will change, causing a layout ‘wiggle’
Expected behavior: The border-width’s should match.
Steps to reproduce: Create two buttons, one set to outline and one set to fill. Have the same button text. Measure the width. The heights appear to be equal.
Related code:
Other information: https://ionic-worldwide.slack.com/archives/C03AJVAJT/p1556736362018500
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.3.1
@angular-devkit/build-angular : 0.13.8
@angular-devkit/schematics : 7.3.8
@angular/cli : 7.3.8
@ionic/angular-toolkit : 1.5.1
System:
NodeJS : v10.14.2 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Button border-width sizing not matching · Issue #18192 - GitHub
Expected behavior: The border-width's should match. Steps to reproduce: Create two buttons, one set to outline and one set to fill. Have the ......
Read more >Why does a button element's height not match that of a sibling ...
I have the following: <div style="border:solid 1px ...
Read more >border-width - CSS: Cascading Style Sheets - MDN Web Docs
The border-width shorthand CSS property sets the width of an element's border. ... It also applies to ::first-letter . Inherited, no.
Read more >Page borders may be displayed or printed incorrectly in Word ...
Describes how to work around a problem where borders in a Word document may not print or be displayed as expected. This problem...
Read more >Overriding Default Button Styles | CSS-Tricks
There are a variety of "buttons" in HTML. ... default look, one with a border and square corners, a gradient background, and no...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Original Slack Question: https://ionic-worldwide.slack.com/archives/C03AJVAJT/p1556734130017800 Here is the thread:
jtth [11:08 AM] have i lost my mind or is the
<ion-button fill="outline">
the exact outline-width wider thanfill="solid"
jphambleton [11:28 AM] Like stroke is aligned to outer?
jtth [11:46 AM] yeah it’s like a pixel or two bigger; i toggle between the fill states to indicate toggled state on a screen and the button size changes ever so slightly and it just doesn’t make sense why that would be something explicitly decided upon
jphambleton [1:20 PM] May be inherited from another element. Might just want to affect the global sheets for that state specifically.
mdlallemont [1:45 PM] @jtth I’m running into the same issue. It would be great if they were consistent or at least give us a good reference doc for how to override the styles for that.
chrisgriffith [2:13 PM] @jtth @mdlallemont It is the border-width value that is different between the two styles. I have opened an issue on it.
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Thank you for using Ionic!