Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pseudo-elements and pseudo-classes #8

Open
Boldewyn opened this issue Aug 27, 2015 · 1 comment
Open

Add support for pseudo-elements and pseudo-classes #8

Boldewyn opened this issue Aug 27, 2015 · 1 comment

Comments

@Boldewyn
Copy link
Contributor

There is postcss/postcss-selector-matches that acts on :matches() selectors. It's much too sophisticated for what is needed here, but might be a good starting point. It might be a bit tricky to correctly match the ones with parentheses like :not(). Suggested translations:

// pseudo-classes
':active': ':aktiv',
':checked': ':markiert',
':default': ':vorgabe',
':dir()': ':richtung()',
':disabled': ':gesperrt',
':empty': ':leer',
':enabled': ':aktiv',
':first': ':erstes',
':first-child': ':erstes-kind',
':first-of-type': ':erstes-vom-typ',
':fullscreen': ':vollbild',
':focus': ':fokus',
':hover': ':schweben',
':indeterminate': ':unbestimmt',
':in-range': ':im-bereich',
':invalid': ':ungültig',
':lang()': ':sprache()',
':last-child': ':letztes-kind',
':last-of-type': ':letztes-vom-typ',
':left': ':links',
':link': ':verknüpfung',
':not()': ':nicht()',
':nth-child()': ':ntes-kind()',
':nth-last-child()': ':n-letztes-kind()',
':nth-last-of-type()': ':n-letztes-vom-typ()',
':nth-of-type()': ':ntes-vom-typ()',
':only-child': ':einziges-kind',
':only-of-type': ':einziges-vom-typ',
':optional': ':optional',
':out-of-range': ':aus-dem-bereich',
':read-only': ':nur-lesen',
':read-write': ':lesen-schreiben',
':required': ':benötigt',
':right': ':rechts',
':root': ':wurzel',
':scope': ':umfang',
':target': ':ziel',
':valid': ':gültig',
':visited': ':besucht',

// pseudo-elements
'::after': '::danach',
'::before': '::davor',
'::first-letter': '::erster-buchstabe',
'::first-line': '::erste-zeile',
'::selection': '::auswahl',
':after': ':danach',
':before': ':davor',
':first-letter': ':erster-buchstabe',
':first-line': ':erste-zeile',
':selection': ':auswahl',
@timche
Copy link
Owner

timche commented Aug 30, 2015

That might be interesting. I would suggest to translate the element selectors as well, when it's possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants