Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Question: Is there a defined behaviour when many Hilite-Criteria evaluate to true?

    Hello Isomorphic,

    reading the Hilite docs and Hilite.setCriteria() I noted that they don't say anything about the case where the Criteria of many Hilites evaluate to true. Example:
    I use two Hilites both setting "color" inside of setCssText() and both have Criteria evaluating to true? Is this allowed or have I to ensure that the Hilites used are mutually exclusive?

    Related question: Is it allowed to have different true-Hilites setting different CSS-properties?
    Example: My rules are:
    • field-value starts with "red": setCssText("color:#FF0000;")
    • field-value ends with "bold": setCssText("font-weight:bold;")

    Would I need three Hilites for this (red, bold, red&bold) or just two (red, bold)?

    If you think that these are reasonable questions it would be great if you could include your answer also in the Hilite-docs.

    Thank you & Best regards,
    Blama

    #2
    Hilites will combine any CSS they apply in declared order.

    Thus for using the same CSS attribute twice, last wins, but for using different CSS attributes, they combine.

    Comment

    Working...
    X