Changes between Version 3 and Version 4 of Zh_CN:Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2024-02-20T12:32:39+01:00 (17 months ago)
Author:
jmxtzgbv9
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Zh_CN:Help/Styles/MapCSSImplementation

    v3 v4  
    88* [wikitr:/Help/Action/Search 搜索对话框]
    99
    10 考虑在 VS code中安装 [https://marketplace.visualstudio.com/items?itemName=whammo.mapcss-syntax MapCSS 语法高亮器],为 MapCSS 绘图和验证器语法添加可视化高亮。
     10另外,可以在 VS code 中安装 [https://marketplace.visualstudio.com/items?itemName=whammo.mapcss-syntax MapCSS 语法高亮器],为 MapCSS 绘图和验证器语法添加可视化高亮。
    1111
    1212
     
    11631163* In [wikitr:/Rules Validator rules] they must be prefixed by a `-`, e.g.: `-osmoseItemClassLevel: "1210/1/1";`
    11641164
    1165 === Property values explanations === #Propertyvaluesexplanations
     1165=== 属性值解释 === #属性值解释
    11661166'' '''Width''' ''
    11671167 - 14.0 (any positive number)
     
    11921192
    11931193
    1194 == Eval expressions ==#Evalexpressions
    1195 See [/doc/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.html#method_summary Javadoc of Functions] for the up-to-date list of functions supported by JOSM's MapCSS implementation.
     1194== 数值表达式 ==#数值表达式
     1195请参阅 [/doc/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.html#method_summary Javadoc of Functions] 获取 JOSM 的 MapCSS 实现所支持函数的最新列表。
    11961196
    11971197 +, -, *, /::
     
    13611361  returns a list of primitive ids which match the key and value (if present) [''since r18829'']
    13621362
    1363 === Examples ===
    1364 * circle symbol for house number with size depending of the number of digits
     1363=== 示例 ===
     1364* 表示门牌号码的圆圈符号,大小取决于位数
    13651365{{{
    13661366#!mapcss
     
    14721472
    14731473=== Kothic ===
    1474  * Kothic has support for eval, which probably differs from JOSM's eval.
    1475  * Kothic understands units, whereas JOSM always calculates in pixel.
    1476  * The extrusion features are not available in JOSM.
     1474 * Kothic 支持 eval,这可能与 JOSM 的 eval 不同。
     1475 * Kothic 能理解单位,而 JOSM 总是以像素为单位计算。
     1476 * JOSM 中没有挤出功能。
    14771477
    14781478=== Ceyx ===
    1479  * seems to have `[tunnel=1]` instead of `[tunnel=yes]` (Halcyon) or `[tunnel?]` (JOSM)
    1480 
    1481 
    1482 == Media queries (deprecated) ==
     1479 * 似乎有 `[tunnel=1]`,而不是 `[tunnel=yes]`Halcyon)或 `[tunnel?]`(JOSM)。
     1480
     1481
     1482== 媒体查询(已废弃) ==
    14831483
    14841484{{{#!td style="background-color: #faa"
    1485 Note: media queries are deprecated. You should use @supports rules instead (see above).
    1486 }}}
    1487 Media queries are used to skip a section of the style under certain conditions. Typically you want to use a feature which is introduced in a newer version of JOSM, but like to have a fall back style for users of older JOSM clients. This feature came with r6970. Example:
     1485注意:媒体查询已被弃用。应使用 @supports 规则(见上文)。
     1486}}}
     1487媒体查询用于在特定条件下跳过样式的某个部分。通常情况下,你想使用较新版本的 JOSM 中引入的功能,但又希望为旧版本的 JOSM 客户端用户提供一种备用样式。此功能在 r6970 中出现。例如:
    14881488{{{
    14891489#!mapcss
     
    15071507}}}
    15081508
    1509 The syntax closely matches the official [https://www.w3.org/TR/css3-mediaqueries/#syntax css syntax]. The following conditions are supported:
     1509该语法与官方[https://www.w3.org/TR/css3-mediaqueries/#syntax css 语法]非常吻合。支持以下条件:
    15101510
    15111511{{{#!th
     
    15371537}}}
    15381538
    1539 Conditions can be combined with `and`:
     1539条件可以与 "和 "结合使用:
    15401540
    15411541{{{
     
    15461546}}}
    15471547
    1548 Multiple combined conditions can be chained with a comma (logical ''or''):
     1548多个组合条件可以用逗号(逻辑 "或")串联起来:
    15491549
    15501550{{{
     
    15551555}}}
    15561556
    1557 Since media queries are only supported in JOSM 6970 and later, you should also specify this as minimum JOSM version in the meta selector:
     1557由于媒体查询只支持 JOSM 6970 及更高版本,因此还应在元选择器中将其指定为最低 JOSM 版本:
    15581558
    15591559{{{
     
    15671567
    15681568{{{#!comment
    1569 There is also the `not` keyword (see the linked css doc for details).
    1570 This is implemented, but probably not very useful. Feel free to add documentation.
    1571 }}}
     1569还有`not`关键字(详见链接的 css 文档)。
     1570该功能已实现,但可能用处不大。欢迎添加文档。
     1571}}}