mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
- Removes the padding from the main toolbar and individually style the components inside of it - Adds a `has-icon-only` class to button, this is used to switch between `unbounded` and `bounded` ripples on buttons in a toolbar. If the button is clear and only has an icon, we use the unbounded "circular" ripple effect, otherwise still use the bounded one. This matches the MD spec, without making the other buttons look off. - Using the class above, style the button differently to match the MD spec - Updates the back button and menu button to use the proper size / icon size - Removes the opacity on an activated back button, it should use the ripple for activated - Moves the margin to the slots in a toolbar by grabbing the "first" and "last" slot and applying a class to them - Makes the segment in a toolbar use the min height from the toolbar - Updates the back button so that it matches the MD spec - Updates the header box shadow to use the old v3 datauri fixes #16950 fixes #14444
79 lines
1.7 KiB
SCSS
79 lines
1.7 KiB
SCSS
@import "./toolbar";
|
|
@import "./toolbar.md.vars";
|
|
|
|
// Material Design Toolbar
|
|
// --------------------------------------------------
|
|
|
|
:host {
|
|
--background: #{$toolbar-md-background};
|
|
--color: #{$toolbar-md-color};
|
|
--border-color: #{$toolbar-md-border-color};
|
|
--padding-top: 0;
|
|
--padding-bottom: 0;
|
|
--padding-start: 0;
|
|
--padding-end: 0;
|
|
--min-height: 56px;
|
|
}
|
|
|
|
|
|
// Toolbar: Content
|
|
// --------------------------------------------------
|
|
|
|
.toolbar-content {
|
|
flex: 1;
|
|
order: map-get($toolbar-order-md, content);
|
|
|
|
min-width: 0;
|
|
max-width: 100%;
|
|
}
|
|
|
|
|
|
// Toolbar: Segment
|
|
// --------------------------------------------------
|
|
|
|
::slotted(ion-segment) {
|
|
min-height: var(--min-height);
|
|
}
|
|
|
|
|
|
// Material Design Toolbar Buttons
|
|
// --------------------------------------------------
|
|
|
|
// Style the first slot with additional margin start
|
|
// this only ever gets added to the first start slot buttons
|
|
::slotted(.buttons-first-slot) {
|
|
@include margin-horizontal(4px, null);
|
|
}
|
|
|
|
// Style the last slot with additional margin end
|
|
// this is added to the end, primary, or secondary slot
|
|
// whichever it finds first, and the first one it finds
|
|
// if multiple of the same name are found
|
|
::slotted(.buttons-last-slot) {
|
|
@include margin-horizontal(null, 4px);
|
|
}
|
|
|
|
|
|
// Material Design Toolbar Slot Placement
|
|
// --------------------------------------------------
|
|
|
|
::slotted([slot="start"]) {
|
|
order: map-get($toolbar-order-md, slot-start);
|
|
}
|
|
|
|
::slotted([slot="secondary"]) {
|
|
order: map-get($toolbar-order-md, slot-secondary);
|
|
}
|
|
|
|
::slotted([slot="primary"]) {
|
|
order: map-get($toolbar-order-md, slot-primary);
|
|
|
|
text-align: end;
|
|
}
|
|
|
|
::slotted([slot="end"]) {
|
|
order: map-get($toolbar-order-md, slot-end);
|
|
|
|
text-align: end;
|
|
}
|