The best way to customize your app would be to override the Sass variables. We still need to improve the documentation behind theming, but it’s on my to do list. You can search through all of the Sass variables and their default values here, as well as what files they are defined in: Overriding Ionic Sass Variables
For example, if you search $item padding
it will pull up all of the variables related to an item and padding. The ones you want are going to be:
$item-ios-padding-left
$item-md-padding-left
$item-wp-padding-left
Which controls the ios
, md
and wp
modes.
Yes, all of the padding attributes can be switched from padding
to margin
and that will modify the margin. We have added it to the documentation but it isn’t live on the site yet. Our staging site shows the latest documentation before we publish it: http://ionic-site-staging.herokuapp.com/docs/v2/theming/css-utilities/
The floating labels rely on item
being a parent, so unfortunately yes in order to use the floating label it will need to have a parent item
. The item gets a class called item-label-floating
and input-has-focus
on focus of the input which the floating label uses.
The conference app we built has some examples of using Sass variables (in the theme
directory): GitHub - ionic-team/ionic-conference-app: A conference app built with Ionic to demonstrate Ionic
Also, in the components directory of the ionic repository we have folders for each component. Each of these have (up to) 4 Sass files:
*.scss // the generic component Sass file used by all modes
*.ios.scss // ios only Sass file
*.md.scss // md only Sass file
*.wp.scss // wp only Sass file
And at the top of those Sass files are all of the variables it uses. For example, the ios Sass file for Action Sheet:
https://github.com/driftyco/ionic/blob/master/src/components/action-sheet/action-sheet.ios.scss#L7-L33
Let me know if you have any questions. Thanks!