syntax:styles

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
syntax:styles [2014/02/09 01:50] – external edit 127.0.0.1syntax:styles [2018/01/10 20:43] (current) – external edit 127.0.0.1
Line 6: Line 6:
 </code> </code>
  
-This node described styles that used as for colorizing of the text as for some UI element as editor indicator margin for example. Inheritable from parent.+This node described styles that used as for colorizing of the text as for some UI element as editor indicator margin for example. Inheritable from the parent.
  
 ====== Style ====== ====== Style ======
Line 34: Line 34:
  
 ==== abstract ==== ==== abstract ====
-If attribute is set, style would not be visible in user settings. Can be used, for example, if you only want to define visibility range for some another style, and do not want to syntax highlight it.+If the attribute is set, the style would not be visible in user settings. Can be used, for example, if you only want to define visibility range for some another style, and do not want to syntax highlight it.
  
 Value: //true|false//\\ Value: //true|false//\\
Line 79: Line 79:
  
 ==== extend ==== ==== extend ====
-Technical attribute, which tells HE that parent style should not be overridden but only extended by some properties. Default is false. If extended = true, then style with same id should exist in some parent syntax. In UI you would see that style still belongs to parent syntax. If you have defined style with same name as already defined in some parent, and don't use extend=true then on UI as the owner of style would be current syntax, and all changes would be applied to it, but not to parent.+Technical attribute, which tells HE that parent style should not be overridden but only extended by some properties. The default is false. If extended = true, then style with the same id should exist in some parent syntax. In UI you would see that style still belongs to parent syntax. If you have defined style with the same name as already defined in some parent, and don't use extend=true then on UI as the owner of the style would be current syntax, and all changes would be applied to it, but not to parent.
  
 Value: //true|false//\\ Value: //true|false//\\
Line 91: Line 91:
  
 ==== override ==== ==== override ====
-Technical attribute, mostly same as extend, but only resets inherited keywords, blocks and words. Default = false. Can be used if you want to completely overwrite definitions for style from parent schema.+Technical attribute, mostly same as extend, but only resets inherited keywords, blocksand words. Default = false. Can be used if you want to completely overwrite definitions for style from parent schema.
  
 Value: //true|false//\\ Value: //true|false//\\
Line 103: Line 103:
  
 ==== inherit ==== ==== inherit ====
-Technical attribute, which tells to copy information from other style to this one. Copied are keywords, blocks, settings, but not containers. This is a better way than duplicate keyword sets. Example can be found in css_spec.xml (inherit="html:elements")+Technical attribute, which tells to copy information from another style to this one. Copied are keywords, blocks, settings, but not containers. This is a better way than duplicate keyword sets. An example can be found in css_spec.xml (inherit="html:elements")
  
 Value: //any id of existing style with/without syntax prefix//\\ Value: //any id of existing style with/without syntax prefix//\\
Line 115: Line 115:
  
 ==== clr/bkclr ==== ==== clr/bkclr ====
-Text (clr) or background (bkclr) color of the style. As color you can use as explicit value in RGB or RGBA (with alpha) format. Like %%#%%FFAAFF (RGB, no transparency) or %%#%%FFFFFFFF (RGBA, transparent, last FF is value of color transparency 0 - opaque, FF - 100% transparent). Transparency of color is used, when you have one style on top of another; for example current line style on top of search results on top of .... You can also use System color. It can be specify as this $0500 (Windows Text color, opaque), where first 05 is value system (correspond to Windows system color constants) color and second 00 is transparency. Because there is no list of the system color yet published, better to use configuration dialog for selecting. And most preferable way is to use Palette colors. Then value of clr or bkclr should correspond to some named color from current color scheme (can be found in HE data\colors, for example, color_default.xml ). In case of using palette colors you can be sure that you would not get black on blackif somebody would select color scheme with black background for document...+Text (clr) or background (bkclr) color of the style. As for coloryou can use as an explicit value in RGB or RGBA (with alpha) format. Like %%#%%FFAAFF (RGB, no transparency) or %%#%%FFFFFFFF (RGBA, transparent, last FF is value of color transparency 0 - opaque, FF - 100% transparent). Transparency of color is used, when you have one style on top of another; for example current line style on top of search results on top of ... You can also use System color. It can be specified as this $0500 (Windows Text color, opaque), where first 05 is value system (correspond to Windows system color constants) color and second 00 is transparency. Because there is no list of the system color yet published, better to use configuration dialog for selecting. And preferable way is to use Palette colors. Then the value of clr or bkclr should correspond to some named color from current color scheme (can be found in HE data\colors, for example, color_default.xml ). In the case of using palette colorsyou can be sure that you would not get black on black if somebody would select color scheme with black background for document...
  
 Value: //RGB|RGBA|Palette color|System color//\\ Value: //RGB|RGBA|Palette color|System color//\\
Line 173: Line 173:
 Default: //true// Default: //true//
 ===== Containers ===== ===== Containers =====
-To control, scope of the styles (in which other style, this style can be used), you can use [[syntax:containers|Containers]]. If no containers for the style defined (also in parent syntax), then editor assumes, that style can appear only inside //normal// (defined in def syntax) style.+To control, scope of the styles or other syntax elements (in which other style, this style can be used), you can use [[syntax:containers|Containers]]. If no containers for the style defined (also in parent syntax), then editor assumes, that style can appear only inside //normal// (defined in def syntax) style.
 <code xml> <code xml>
 <Containers> <Containers>
Line 185: Line 185:
 If you want to exclude some parent definition of container, you can add to the list container with id defied in parent syntax and add attribute exclude: If you want to exclude some parent definition of container, you can add to the list container with id defied in parent syntax and add attribute exclude:
 <code xml><Open id="string" exclude="true"/></code> <code xml><Open id="string" exclude="true"/></code>
 +
 +<note>The style can be used as container ONLY if it has defined text ranges -> [[syntax:styles:blocks|blocks]] with start and end tag. </note>
  
 It is also possible to address style from another existing syntax, for this add syntax id before style id separated by //://, like this: It is also possible to address style from another existing syntax, for this add syntax id before style id separated by //://, like this: