Пример #1
0
    def css_property_values(self, view, prefix, pos):
        prefix = css_prefixer(view, pos)
        prop   = find_css_property(view, pos)
        # These `values` are sourced from all the fully specified zen abbrevs
        # `d:n` => `display:none` so `display:n{tab}` will yield `none`
        values = css_property_values.get(prop)

        if values and prefix and prefix in values:
            oq_debug("zcprop:val prop: %r values: %r" % (prop, values))
            return [(prefix, v, v) for d,v in sorted(values.items())]
        else:
            # Look for values relating to that property
            # Remove exact matches, so a \t is inserted
            values =  [v for v in CSS_PROP_VALUES.get(prop, []) if v != prefix]
            if values:
                debug("zenmeta:val prop: %r values: %r" % (prop, values))
                return [(prefix, ':' + v, v) for v in values]
Пример #2
0
    def css_property_values(self, view, prefix, pos):
        prefix = css_prefixer(view, pos)
        prop   = find_css_property(view, pos)
        # These `values` are sourced from all the fully specified zen abbrevs
        # `d:n` => `display:none` so `display:n{tab}` will yield `none`
        values = css_property_values.get(prop)

        if values and prefix and prefix in values:
            oq_debug("zcprop:val prop: %r values: %r" % (prop, values))
            return [(prefix, v, v) for d,v in sorted(values.items())]
        else:
            # Look for values relating to that property
            # Remove exact matches, so a \t is inserted
            values =  [v for v in CSS_PROP_VALUES.get(prop, []) if v != prefix]
            if values:
                debug("zenmeta:val prop: %r values: %r" % (prop, values))
                return [(prefix, ':' + v, v) for v in values]