1
0
mirror of https://github.com/flarum/core.git synced 2025-06-12 09:32:11 +02:00

Major CSS revamp

- Get rid of Bootstrap (except we still rely on some JS)
- Use BEM class names
- Rework variables/theme config
- Fix various bugs, including some on mobile

The CSS is still not ideal – it needs to be cleaned up some more. But
that can be a focus for after beta.
This commit is contained in:
Toby Zerner
2015-07-17 14:47:49 +09:30
parent 76678f72f2
commit a9ded36b57
206 changed files with 4337 additions and 8830 deletions

View File

@ -24,10 +24,9 @@ export default class Button extends Component {
delete attrs.children;
attrs.className = (attrs.className || '');
attrs.href = attrs.href || 'javascript:;';
const iconName = extract(attrs, 'icon');
if (iconName) attrs.className += ' has-icon';
if (iconName) attrs.className += ' hasIcon';
const disabled = extract(attrs, 'disabled');
if (disabled) {
@ -35,7 +34,7 @@ export default class Button extends Component {
delete attrs.onclick;
}
return <a {...attrs}>{this.getButtonContent()}</a>;
return <button {...attrs}>{this.getButtonContent()}</button>;
}
/**
@ -48,8 +47,8 @@ export default class Button extends Component {
const iconName = this.props.icon;
return [
iconName ? icon(iconName) : '',
<span className="label">{this.props.children}</span>
iconName ? icon(iconName, {className: 'Button-icon'}) : '',
this.props.children ? <span className="Button-label">{this.props.children}</span> : ''
];
}
}