CoffeeScript CSS ccss

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-16 21:58:35

软件介绍

CoffeeScript CSS 这个名字跟 CoffeeScript 无关,将脚本化的样式变成 CSS 代码。

install: npm install ccss

main.coffee:

ccss = require 'ccss'

template = require './template.coffee'
css = ccss.compile template
require('fs').writeFileSync 'main.css', css

#or all at once: ccss.compileFile './template.coffee', 'main.css'

template.coffee:

borderRadius = (str) ->
  WebkitBorderRadius: str
  MozBorderRadius:    str
  borderRadius:       str

boxShadow = (str) ->
  WebkitBoxShadow: str
  MozBoxShadow:    str
  boxShadow:       str

module.exports =
  form:
    input:
      padding: '5px'
      border: '1px solid'
      mixins: borderRadius '5px'
  '#id .className': do ->
    opaque = 1
    translucent = opaque / 2
    img:
      mixins: [
        borderRadius '5px'
        boxShadow '5px'
      ]
      opacity: translucent
    'img:hover':
      opacity: opaque

main.css:

form input {
  padding: 5px;
  border: 1px solid;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
}
#id .className img {
  opacity: 0.5;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  -webkit-box-shadow: 5px;
  -moz-box-shadow: 5px;
  box-shadow: 5px;
}
#id .className img:hover {
  opacity: 1;
}

本文地址:https://codercto.com/soft/d/3740.html

淘宝、天猫网上开店速查速用一本通

淘宝、天猫网上开店速查速用一本通

刘珂 / 北京时代华文书局 / 2015-6 / 39.8

为了帮助众多的新手卖家掌握淘宝天猫网上开店、货源准备、店铺装修、商品拍摄、交易方法、营销推广以及售后服务等知识,本书作者根据自己多年网上开店心得,并结合了多名淘宝五皇冠店主和天猫旗舰店卖家的经验,精心策划编写了本书。 《淘宝、天猫网上开店速查速用一本通:开店、装修、运营、推广完全攻略》将目前最前沿、最流行的营销理念运用到淘宝天猫网上平台,所有技术都在实际应用获得显著效果,并且还在持续创造着惊......一起来看看 《淘宝、天猫网上开店速查速用一本通》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

MD5 加密
MD5 加密

MD5 加密工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试