def translate_style(name, style):
    parts = [name % u'#%s']
    if style.pseudo_element:
        root = parts.pop()
        for pe in style.pseudo_element.split(u','):
            parts.append(root + u'::%s' % pe.strip())
    if style.pseudo_class:
        these = parts[:]
        parts = []
        for pc in style.pseudo_class.split(u','):
            pc = pc.strip()
            for this in these:
                parts.append(this + u':%s' % pc)
    selector = u','.join(parts)
    body = u'{\n%s\n}' % _translate_style_body(style)
    return u'%s %s' % (selector, body)


#------------------------------------------------------------------------------
# Dock Area Styling
#------------------------------------------------------------------------------
dataset/ETHPy150Open nucleic/enaml/enaml/qt/styleutil.py/translate_style/swapped operands of `%`