Files
Brandy Carney 8029df344a fix(segment): set colors in the parent segment and remove the unused color property (#16590)
* style(theming): clean up sass TODOs

* fix(item): use proper padding on small buttons in an item

* refactor(components): remove color from unused components

* chore(components): update build files to remove color

* fix(tab-bar): remove unused layout prop

* test(segment): add custom test and update standalone

* docs(segment): update usage examples to remove layout

* test(segment): update tests to remove layout

* test(tab-bar): update tests to remove layout

* fix(segment): set the colors in the parent segment

but use them in the child segment button

This allows the user to customize all of the segment buttons from segment, while still allowing the `color` property to take precedence, and they can also edit the segment button colors directly if desired.

This actually fixes some bugs surrounding colors and allows customization for a segment inside of a toolbar.

references #14853

* style(sass): fix lint errors

* chore(build): build files

* fix(segment-button): use transparent background

* docs(segment-button): add color activated back

* why does the build hate me

* fix(segment): set initial css variables to avoid inheriting

* fix(segment): set initial color activated

also add new line to the nav readme because reasons

* test(segment): parent mode should match children
2018-12-06 00:12:14 +01:00

49 lines
795 B
SCSS

@import "../../themes/ionic.globals";
// Segment
// --------------------------------------------------
:host {
--indicator-color-checked: initial;
--ripple-color: initial;
--color-activated: initial;
@include font-smoothing();
display: flex;
align-items: center;
justify-content: center;
width: 100%;
font-family: $font-family-base;
text-align: center;
}
// Segment: Disabled
// --------------------------------------------------
:host(.segment-disabled),
::slotted(.segment-button-disabled) {
pointer-events: none;
}
// Segment: Scrollable
// --------------------------------------------------
:host(.segment-scrollable) {
justify-content: start;
width: auto;
overflow-x: scroll;
}
:host(.segment-scrollable::-webkit-scrollbar) {
display: none;
}