Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time-spinner 无样式定义问题 #1335

Closed
renxia opened this issue Nov 24, 2016 · 7 comments
Closed

time-spinner 无样式定义问题 #1335

renxia opened this issue Nov 24, 2016 · 7 comments

Comments

@renxia
Copy link
Contributor

renxia commented Nov 24, 2016

导致的效果如图所示:

time-spinner

查看文档示例,应当添加如下样式修饰:

.el-time-spinner {
    display: flex;
    width: 100%;
}

具体位置:https://github.com/ElemeFE/element/blob/dev/packages/theme-default/src/date-picker/time-spinner.css#L4

添加后就显示正常了

@QingWei-Li
Copy link
Contributor

来个 pr?

@renxia
Copy link
Contributor Author

renxia commented Nov 24, 2016

举手之劳,分分钟你就改掉了,麻烦速度的,给你 100 个赞。
你们的提交太麻烦了,我懒人(其实是还没搞明白)

@renxia
Copy link
Contributor Author

renxia commented Nov 24, 2016

box-size

另外再提一个:

如图,在 bootstrap 中,默认重置了 box-sizing: border-box;,这会导致放在一起使用时,checkbox 样式变形,如图,所以应当加上图示的显示定义。

@reverland
Copy link
Contributor

#1229 ?
话说,用bootstrap应该是把bootstrap放在最前头。checkbox应该没什么问题

element本身不打算reset,总感觉哪里可能会不太对的样子。。。但用这个来reset的话目前看没什么问题https://www.npmjs.com/package/postcss-css-reset (postcss-salad用的)。

@renxia
Copy link
Contributor Author

renxia commented Nov 25, 2016

bootstrap 是在前面的,但是 bootstrap 使用的是全局修改了重置,参见这里:

https://github.com/twbs/bootstrap/blob/v3-dev/less/scaffolding.less#L16

http://getbootstrap.com/getting-started/#third-box-sizing

这样 element 没有显示声明自己使用的盒式模型,那么就会应用这个重置样式,界面自然就变形了。

这里其实不是说 element 需要重置,而是这个组件在这里要求使用 box-sizing: content-box 方式才正常,那么声明出来应该对组件自身来说,兼容性上更强一些。

@renxia
Copy link
Contributor Author

renxia commented Nov 25, 2016

看来 #1229 已经做了 box-sizing 显示声明这个事情

对于 time-spinner 的样式未定义是否也有对应 fix 了呢

@reverland
Copy link
Contributor

time-spinner还用flex了呢。。听说要改掉。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants