Giter Club home page Giter Club logo

coloruicss's Issues

新组件需求 - 拖拽组件

很多时候,一个列表里面的item需要进行排序,如果能提供组件的拖拽功能,item就能自由进行排序,谢谢

组件-form表单选择图标点击区域

组件-form表单选择组件右边的图标点击无效。
picker组件因为padding的关系,导致了右边图标附近的区域都是无法响应点击事件的,有强迫症的无法忍受,希望能完善这个问题,谢谢!

不支持控件

在控件中使用
@import '/path/to/colorui/colorui.wxss';

会报错
Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors

关于字体图标的建议

页面样式做得很棒,但是,给一个小小的建议。

由于 ColorUI 是一个几乎纯 CSS 的库,那么有时为了达到我们自己产品的需求,需要引用其它的库。
大的方向倒是没有什么,只是在字体图标上面:

很多库都用了 iconfont,那么,他们的 font-family 全部是都是 iconfont

所以,我建议:font-family 设置成自己的名称,比如:

// icon.wxss
[class*="icon-"] {
    font-family: "cufont" !important;   // 修改此行
    font-size: ...
    ...
}

@font-face {
    font-family: "cufont";   // 修改此行
    src: ...
    ...
}

// colorui.wxss 中所有用到 iconfont 的地方,比如:
image.loading::after {
    content: "\e7f1";
    font-family: "cufont";   // 修改此行
    position: ...
    ...
}

设置成上述名称后,比较能够保证图标的独立性,避免因为 content 和别人冲突后,被覆盖的问题。尤其是那些含有 js 组件的类库,几乎都是后加载的,一般都会覆盖 wxss。

icon标签失效

项目引入colorui后 <icon> 标签就都失效了。
目前是我把[class*="icon-"] 改成 [class*="iconfont-"] 其它 icon- 也都相应改成 iconfont- 就好了。

模态窗口的侧边抽屉高度不对

模态窗口的侧边抽屉高度不对,忘记减掉顶部导航栏的高度(并且好多底部的功能栏没有兼容iPhoneX,iPhoneX底部有34px的安全区)
img_0841
img_0842

colorui.wxss里全是!important

我自己想修改一些东西,改了半天发现没用,后面发现有!important,以致于我要再写个!important覆盖才行,不能按照CSS正常的层叠的优先级,然后我在colorui.wxss里搜索!important关键字,发现匹配166个,就是说基本全篇都是,能不能把这些去掉呢?

https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
里面也说了:“Never use !important when you're writing a plugin/mashup.”
你们作为第三方组件库,应该要避免这种情况吧?

.solid 子元素点击事件无效

代码如下
test.wxml

<view class="solid box">
  <button bindtap="clickConsole" class="btn primary">测试 solid </button>
</view>

test.js

Page({
  clickConsole: function() {
    console.log('click!');
  }
})

css也能导致按钮的bindtap事件失效,发现把.solid::after的宽度高度设为100%就可以了,或者加上pointer-events: none

.solid::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    content: " ";
    -webkit-transform: scale(.5);
    transform: scale(.5);
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    pointer-events: none
}

做的非常不错

建议
1、出一个文档
2、弹框的比较马虎,需要细节化一下。
3、希望能类似于PC一样 有一个公共核心 css(wxss)库,
我看过很多开源的UI框架,都喜欢写成一个一个组件,可能很多时候 别人用不着这些组件,他们需要一个核心的样式库而已。

总体来说,非常棒。 出个文档就很好了、

so cool

界面也太漂亮了趴!膜拜大佬,可以请教大佬后端该怎么搞吗

就一个问题

首先做的很不错
其次,这套wxss样式只能用在page层级
在自定义组件的wxml中基本无法使用
自定义组件的wxss中诸多的选择器限制是个麻烦

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.