bug: On ion-toggle, toggle-inner does not adapt to height and width
See original GitHub issueBug Report
Ionic version:
[x] 4.10
Current behavior:
We can change height and width of a ion-toggle but toggle-inner does not adapt the respective height and width
Here is the styling that I am using:
<ion-toggle #onOffToggle mode='ios'></ion-toggle>
ion-toggle {
--background: var(--color-red);
--background-checked: var(--color-green);
height: 20px;
width: 50px;
}
Expected behavior:
Inner circle should adapt to the respective height
Also by some way can I make toogle look like this?
Steps to reproduce:
<ion-toggle #onOffToggle mode=‘ios’></ion-toggle>
Other information:
Ionic info:
Ionic:
Ionic CLI : 5.4.2
Ionic Framework : @ionic/angular 4.10.0
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.0.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 5 other plugins)
Utility:
cordova-res : not installed
native-run : 0.2.9
System:
Android SDK Tools : 26.1.1 (C:\Program Files\Android\android-sdk)
NodeJS : v12.13.0 (C:\Program Files\nodejs\node.exe)
npm : 6.12.0
OS : Windows 10
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:14 (2 by maintainers)
Top Results From Across the Web
On ion-toggle, toggle-inner does not adapt to height and width ...
Looks good, one bug I've found is in "md" mode you can't override the handle background when the toggle is checked. It always...
Read more >Ion-toggle size Ionic4 - Ionic Forum
Hello,. I'm desperate to change the size of a toggle (width: 100%;). the handle is blocked. Does anyone have a solution?
Read more >ion-toggle : Reduce size of toggle button - Stack Overflow
track class to adjust following css properties: width: 51px; height: 31px;. and then .toggle .handle to adjust following css properties: width ...
Read more >A Knob Trick For Ion-Toggle and Ion-Range - Level Up Coding
This is a small article about leveraging the CSS “background” ... I did remove width='512' height='512' from the SVG source as Safari is...
Read more >@ionic/core | Yarn - Package Manager
Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a single codebase ......
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 FreeTop 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
Top GitHub Comments
Any solution for the above issue
+1