目前我正在開發一些應用程序的GUI,這是在QT(多平臺框架)中開發的。 QT中的GUI可以作爲普通的CSS來設計。OOCSS to Long CSS生成器
所以,我開發GUI作爲一個基本的web應用程序(HTML5,CSS3和JS),我使用較少的預處理的造型和創造一些原因OOCSS(面向對象CSS)...
通過LESS生成:
.button {
position: absolute;
display: block;
text-align: center;
line-height: 50px;
height: 50px;
text-transform: uppercase;
text-decoration: none;
font-size: 14px;
width: 120px;
background-color: white;
color: blue;
}
.button.button-big {
font-size: 20px !important;
width: 200px !important;
}
.button.button-green {
background-color: green !important;
color: white !important;
}
是否有轉換到OOCSS造型舊校園(加長版)任何工具或任務(咕嚕/一飲而盡)?
預期的結果:
.button {
position: absolute;
display: block;
text-align: center;
line-height: 50px;
height: 50px;
text-transform: uppercase;
text-decoration: none;
font-size: 14px;
width: 120px;
background-color: white;
color: blue;
}
.button-big {
position: absolute;
display: block;
text-align: center;
line-height: 50px;
height: 50px;
text-transform: uppercase;
text-decoration: none;
font-size: 14px;
width: 120px;
background-color: white;
color: blue;
font-size: 20px !important;
width: 200px !important;
}
.button-green {
position: absolute;
display: block;
text-align: center;
line-height: 50px;
height: 50px;
text-transform: uppercase;
text-decoration: none;
font-size: 14px;
width: 120px;
background-color: white;
color: blue;
background-color: green !important;
color: white !important;
}
當然,我將不得不清理類,但該工具會來救我的幾個小時。
原因: 我的客戶端在CSS中不是高級的。所以,OOCSS可能對他一點困惑。
感謝您的答覆 亞當
你爲什麼要這樣做? –
Couse對於我的客戶來說,開發該應用程序會更容易。我只準備CSS類... –
我不明白。你的意思是說你的客戶**更容易維持**嗎?最初因素的類更容易維護。 –