mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
Merge remote-tracking branch 'origin/css-refactor' into css-refactor
This commit is contained in:
@ -169,7 +169,7 @@ const BUTTON_SIZE_ATTRS = ['large', 'small'];
|
||||
const BUTTON_STYLE_ATTRS = ['clear', 'outline', 'solid'];
|
||||
const BUTTON_SHAPE_ATTRS = ['round', 'fab'];
|
||||
const BUTTON_DISPLAY_ATTRS = ['block', 'full'];
|
||||
const IGNORE_ATTRS = /_ng|button/;
|
||||
const IGNORE_ATTRS = /_ng|button|left|right/;
|
||||
|
||||
const TEXT = 1;
|
||||
const ICON = 2;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</button>
|
||||
</ion-buttons>
|
||||
|
||||
<button menu-toggle="rightMenu" right>
|
||||
<button menu-toggle="rightMenu" right secondary>
|
||||
<icon menu></icon>
|
||||
</button>
|
||||
|
||||
|
@ -461,12 +461,14 @@ export class TextInputElement {
|
||||
this.type = type;
|
||||
this.elementRef = elementRef;
|
||||
this.wrapper = wrapper;
|
||||
|
||||
this.renderer = renderer;
|
||||
renderer.setElementAttribute(this.elementRef, 'text-input', '');
|
||||
|
||||
// all text inputs (textarea, input[type=text],input[type=password], etc)
|
||||
renderer.setElementClass(elementRef, 'text-input', true);
|
||||
|
||||
if (wrapper) {
|
||||
// it's within ionic's ion-input, let ion-input handle what's up
|
||||
renderer.setElementClass(elementRef, 'item-input', true);
|
||||
wrapper.registerInput(this);
|
||||
}
|
||||
}
|
||||
|
@ -274,17 +274,23 @@ ion-buttons[right] {
|
||||
// iOS Toolbar Menu Toggle
|
||||
// --------------------------------------------------
|
||||
|
||||
.toolbar {
|
||||
[menu-toggle] {
|
||||
order: map-get($toolbar-order-ios, menu-toggle-start);
|
||||
}
|
||||
.bar-button-menu-toggle {
|
||||
margin: 0 6px;
|
||||
padding: 0;
|
||||
min-width: 36px;
|
||||
order: map-get($toolbar-order-ios, menu-toggle-start);
|
||||
|
||||
[menu-toggle][end],
|
||||
[menu-toggle][right] {
|
||||
order: map-get($toolbar-order-ios, menu-toggle-end);
|
||||
icon {
|
||||
padding: 0 6px;
|
||||
font-size: 2.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
.bar-button-menu-toggle[end],
|
||||
.bar-button-menu-toggle[right] {
|
||||
order: map-get($toolbar-order-ios, menu-toggle-end);
|
||||
}
|
||||
|
||||
|
||||
// iOS Toolbar Color Generation
|
||||
// --------------------------------------------------
|
||||
|
@ -258,22 +258,23 @@ ion-buttons[right] {
|
||||
// Material Design Toolbar Menu Toggle
|
||||
// --------------------------------------------------
|
||||
|
||||
.toolbar {
|
||||
[menu-toggle],
|
||||
[menu-toggle].activated {
|
||||
padding: 0 2px;
|
||||
min-width: 44px;
|
||||
.bar-button-menu-toggle {
|
||||
margin: 0 6px;
|
||||
padding: 0 2px;
|
||||
min-width: 44px;
|
||||
order: map-get($toolbar-order-md, menu-toggle-start);
|
||||
|
||||
icon {
|
||||
font-size: 2.4rem;
|
||||
}
|
||||
icon {
|
||||
padding: 0 6px;
|
||||
font-size: 2.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
[menu-toggle][secondary],
|
||||
[menu-toggle][secondary].activated {
|
||||
margin: 0 2px;
|
||||
min-width: 28px;
|
||||
}
|
||||
.bar-button-menu-toggle[end],
|
||||
.bar-button-menu-toggle[right] {
|
||||
margin: 0 2px;
|
||||
min-width: 28px;
|
||||
order: map-get($toolbar-order-md, menu-toggle-end);
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,18 +33,9 @@
|
||||
// Menu Toggle
|
||||
// --------------------------------------------------
|
||||
|
||||
.toolbar [menu-toggle] {
|
||||
.bar-button-menu-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 6px;
|
||||
padding: 0;
|
||||
min-width: 36px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.toolbar [menu-toggle] icon {
|
||||
padding: 0 6px;
|
||||
font-size: 2.8rem;
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ ion-buttons div {
|
||||
|
||||
// TODO this is a temp hack to fix segment overlapping ion-nav-item
|
||||
ion-buttons,
|
||||
[menu-toggle] {
|
||||
.bar-button-menu-toggle {
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
|
@ -151,19 +151,21 @@ export class ToolbarTitle extends Ion {
|
||||
@Directive({
|
||||
selector: 'ion-buttons,[menu-toggle]'
|
||||
})
|
||||
export class ToolbarItem extends Ion {
|
||||
export class ToolbarItem {
|
||||
constructor(
|
||||
elementRef: ElementRef,
|
||||
@Optional() toolbar: Toolbar,
|
||||
@Optional() @Inject(forwardRef(() => Navbar)) navbar: Navbar
|
||||
) {
|
||||
super(elementRef, null);
|
||||
toolbar && toolbar.addItemRef(elementRef);
|
||||
navbar && navbar.addItemRef(elementRef);
|
||||
this.inToolbar = !!(toolbar || navbar);
|
||||
}
|
||||
|
||||
@ContentChildren(Button)
|
||||
set _buttons(buttons) {
|
||||
Button.setRoles(buttons, 'bar-button');
|
||||
if (this.inToolbar) {
|
||||
Button.setRoles(buttons, 'bar-button');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user