当前位置: 首页 > 软件库 > 程序开发 > >

ember-style-modifier

{{style}} element modifier for ember.js
授权协议 MIT License
开发语言 JavaScript
所属分类 程序开发
软件类型 开源软件
地区 不详
投 递 者 滕璞瑜
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

ember-style-modifier

This addon provides a {{style}} element modifier to set element's style.This allows to set custom CSS of an element without requiring a Content Security Policy style-src-attr: "unsafe-inline".

Compatibility

  • Ember.js v3.4 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

ember install ember-style-modifier

Usage

It expects CSS declarations as named arguments or as a hash as positionalargument. Property names are supported in dasherized as well as in camelCasespelling. Value must be a string or undefined. You may set a priority byadding an "!important" suffix.

<p
  {{style
    border="1px"
    padding="1em !important"
  }}
>
</p>

<p
  {{style
    (hash border="1px" padding="1em !important")
  }}
>
</p>

You may pass multiple hashes as positional arguments and combine hasheswith named arguments. If multiple hashes are passed and contain CSSdeclarations for the same property, last one wins. If hashes and namedarguments declare same property, named argument wins.

Adding styles to pseudo-elements is not supported.

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

  • There are modifiers: private、 protected、 public、 internal, virtual, sealed, override, abstract, extern. Copy from msdn. 修饰符                                    用途                                    访问修

 相关资料
  • 标签用于进行影响其内容呈现的样式更改。 语法 (Syntax) 以下是使用此标记的简单语法 - <mstyle> expression </mstyle> 参数 (Parameters) 以下是此标记的所有参数的说明 - expression - 推断的mrow元素。 属性 (Attributes) 以下是此标记的所有属性的说明 - scriptlevel - 为子项指定scriptlevel。

  • 应用程序样式是指用户调整组件的外观。 这些调整可能包括:颜色,颜色渐变,字体,边距/填充等.Ext JS 6有一种新的应用程序样式。 它使用SCSS进行样式设计。 SCSS是一种更动态的CSS代码编写方式。 我们可以借助于此函数在样式表中编写变量。 但是,浏览器无法理解SCSS。 它只能理解CSS,因此所有SCSS文件都应该编译成CSS到生产就绪代码。 因此,SCSS文件称为预处理器文件。 在Ex

  • 该协议 v1.15.11 及以上版本才支持 设置Network列表行样式: pattern style://color=@fff&fontStyle=italic&bgColor=red pattern参见匹配模式,更多模式请参考配置方式;style可以设置: color: 字体颜色,跟css的color属性一致,但由于 # 为whistle但注释符号,这里可以用 @ 代替 fontStyle:

  • Type: Element 自定义类型,它的方法允许所有的Element对象使用。 Element Method: setStyle 设置一个元素的CSS属性。 语法: myElement.setStyle(property, value); 参数: property - (string) 要设置的属性。 value - (mixed) 属性值,当是一个数字时,并且属性需要一个单位时,自动加上'p

  • Key principle Highlight.js themes are language agnostic. Instead of trying to make a rich set of highlightable classes look good in a handful of languages we have a limited set of classes that work fo

  • 描述 (Description) list-style属性是一个简写属性,用于设置列表中标记的位置和类型; 它也可以用于指定图像作为标记。 可能的值 (Possible Values) 《list-style-type》 - 属性list-style-type的任何允许值。 《list-style-position》 - 属性list-style-position的任何允许值。 《list-sty