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.

fixed ion-label custom width

See original GitHub issue

Ionic version: (check one with “x”) [ ] 1.x [ ] 2.x [x] 3.x

I’m submitting a … (check one with “x”) [ ] bug report [x] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior: When using a fixed label, the width is set to 100px as seen here

Expected behavior: We should at least have a variable to change that default width, which imho only makes sense on some specific device. I am currently using it on desktop browser and the labels look extremely small.

Related code:

<ion-item>
  <ion-label fixed>Label that will be ellipsized</ion-label>
  <ion-input type="text"></ion-input>
</ion-item>

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.4.0 
Ionic Framework Version: 3.1.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: 1.9.1 
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v7.4.0
Xcode version: Xcode 8.3.2 Build version 8E2002

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
aa-telalicommented, May 20, 2018

Hi guys, found this as I was looking to see if it had been fixed…

Shouldn’t this have been marked as a bug - It’s setting a Fixed label to always be 100px even if the screen is 1100px wide?

Guessing that was supposed to be 100% instead of 100px?

See CSS here: https://github.com/ionic-team/ionic/blob/e7deb27688cfcb69a95ea4b7a6242718574269bb/core/src/components/label/label.scss#L36

0reactions
ionitron-bot[bot]commented, Sep 1, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fixed ion-label custom width · Issue #11666 - GitHub
When using a fixed label, the width is set to 100px as seen here. Expected behavior: We should at least have a variable...
Read more >
How to change the width of a fixed ion-label - Ionic Forum
What is the right way to change the width of a fixed ion-label? I have a form with: <ion-item> <ion-label fixed>Fairly long label ......
Read more >
ion-label with custom full width form control - Stack Overflow
Currently as soon as I add an ion-label to my ion-item inside my form, where I am using a custom form control (not...
Read more >
C38: Using CSS width, max-width and flexbox to fit labels and ...
The max-width is applied in order to fix elements spilling out of the grid in a cross-browser way, as replaced elements such as...
Read more >
Understanding How Slots are Used in Ionic 4 | Josh Morony
In this article, we explore the role of slots in Ionic 4 and how they are implemented using web components.
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