Skip to content

Conversation

@elchininet
Copy link
Owner

This pull request solves #65

This property consists of a string map to treat some declarations as others, very useful to flip the values of CSS variables

input
:root {
    --my-padding: 1rem 1rem 1.5rem 1.5rem;
}

.test {
    padding: var(--my-padding);
}
No aliases string map (default)
output
:root {
    --my-padding: 1rem 1rem 1.5rem 1.5rem;
}

.test {
    padding: var(--my-padding);
}
Set an aliases string map
const options = {
    aliases: {
        '--my-padding': 'padding'
    }
};
output
[dir="ltr"]:root {
    --my-padding: 1rem 1rem 1.5rem 1.5rem;
}

[dir="rtl"]:root {
    --my-padding: 1rem 1.5rem 1.5rem 1rem;
}

.test {
    padding: var(--my-padding);
}

@elchininet elchininet added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels May 23, 2021
@elchininet elchininet self-assigned this May 23, 2021
@elchininet elchininet force-pushed the add_rtlcss_aliases_option branch from e9387ef to 0fc176d Compare May 23, 2021 17:26
@elchininet elchininet merged commit d79705c into master May 23, 2021
@elchininet elchininet deleted the add_rtlcss_aliases_option branch May 23, 2021 17:30
@elchininet elchininet mentioned this pull request May 23, 2021
@elchininet elchininet linked an issue May 23, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flip variables values

2 participants