13.13. Sass selector function

发布时间 : 2025-10-25 13:32:21 UTC      

Page Views: 9 views

The Sass selector function is used to view and process selectors.

The following table lists the selector functions for Sass:

Function

Description & example

is-superselector(super, sub)

Compare the matching range of the two selectors, that is, determine whether the super selector contains the range matched by the sub selector, and return true if yes, false otherwise.

Example: is-superselector (“div”, “div.myInput”) result: true is-superselector (“div.myInput”, “div”) result: false is-superselector (“div”, “div”) result: true

selector-append(selectors)

Add a second (or multiple) to the end of the first selector. Selector.

Example: selector-append (“div”, “.myInput”) result: div.myInput selector-append (“.resume”, “_ _ a”) result: .resume _ a

selector-extend(selector, extendee, extender)

selector-nest(selectors)

Returns a new selector that generates a nested list through the list selector provided.

Example: selector-nest (“ul”, “li”) result: ul li selector-nest (“.birthday”, “alert”, “div”) result: .resume div, alert div

selector-parse(selector)

Converts the selector selector of a string to a selector queue.

Example: selector-parse (“H1 .myInput. Yield”) result: (‘H1 ‘.myInput’ ‘.upload’)

selector-replace(selector, original, replacement)

Given a selector, replace original with replacement and return a new selector queue.

Example: selector-replace (“p.warning”, “p”, “div”) result: div.warning

selector-unify(selector1, selector2)

Synthesize two sets of selectors into a composite selector. If the two selectors cannot be combined, the null value is returned.

Example: selector-unify (“myInput”, “.blank”) result: myInput.disabled selector-unify (“p”, “H1”) result: null

simple-selectors(selectors)

Split the composite selector into a single selector.

Example: simple-selectors (“div.myInput”) result: div, .myInput simple-selectors (“div.myInput:before”) result: div, .myInput,: before

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。