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