Skip to content

Instantly share code, notes, and snippets.

@loke-dev
Last active November 5, 2021 13:53
Show Gist options
  • Save loke-dev/1154b8a00ff69997fec6cbb2167b0fa6 to your computer and use it in GitHub Desktop.
Save loke-dev/1154b8a00ff69997fec6cbb2167b0fa6 to your computer and use it in GitHub Desktop.
Vscode - search and replace with wildcard
// Search for:
breakpoint\("([a-zA-Z]*)?"\s*(\) - 1px)
// Replace with:
(breakpoint("$1") - 1px)
// Will produce the following change:
@media (max-width: breakpoint("tiny") - 1px) {
@media (max-width: (breakpoint("tiny") - 1px)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment