Coder Social home page Coder Social logo

Comments (4)

zdhxiong avatar zdhxiong commented on August 22, 2024

没有宽度的话怎么确保 .mdui-panel-item-summary 的内容能垂直对齐?

from mdui.

szchenghuang avatar szchenghuang commented on August 22, 2024

.mdui-panel-item-title.mdui-panel-item-summary只有一兩個字內容的狀況下,我想要讓 summary 緊接著 title 放置,只隔著 16px 的 padding,畢竟panel 對我來說不像 table 在對齊上有這麼強烈的要求。但是目前寬度被指定了,所以無法達成。規範裡沒有指定寬度,如果照規範的話是可以的。

至於垂直對齊,同樣沒有在規範裡。雖然說規範裡面沒有明說,但是從圖裡看似有一個寬度的控制。

這寬度對齊問題如果可以用.mdui-col-*之類的類別來解決應該滿適合的,就是沒試過在.mdui-panel-item-header裡能不能放.mdui-col-*,估計會有衝突,一般都是*-col的元素包含組件,而不是組件包含*-col元素。

from mdui.

zdhxiong avatar zdhxiong commented on August 22, 2024

我更新了 panel 的样式,现在只限定了.mdui-panel-item-title的宽度,.mdui-panel-item-summary的宽度会自适应。

我还是觉得垂直对齐会适合大多数的场景,规范给出的例子中也都是对齐的。

你可以自己添加 CSS 来取消宽度限制:

.mdui-panel-item-title {
  width: auto;
  min-width: 0;
}

from mdui.

szchenghuang avatar szchenghuang commented on August 22, 2024

的確我是打算覆蓋寬度的設定。多謝你的建議!

from mdui.

Related Issues (20)

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.