question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto Prefix replacement

See original GitHub issue

A really popular issue is the ability to have variable properties… but the main/only use-case I’ve seen is prefixes.

I saw that stylus supports automatically expanding properties with prefixes…

For cases where the syntax is different we suggest people use a mixin for that property and alter the arguments to work with different versions.

For cases where the syntax is the same, I suggest we have

-*-gradient: blah;

which is transformed to a set of prefixes

-webkit-gradient: blah;
-ms-gradient: blah;
-mozilla-gradient: blah;

which can be overridden with a option

--prefixes=ms,webkit

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:25 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
matthew-deancommented, May 29, 2013

Based on the fact that we’re going to move forward with variable interpolation within properties, then, as has been mentioned, I think this is now solved. Because you will essentially be able to do this.

@prefix-moz: true;
@prefix-webkit: true;

.moz-prefix(@prop, @value) when (@prefix-moz) {
  -moz-@{prop}: @value;
}
.webkit-prefix(@prop, @value) when (@prefix-webkit) {
  -webkit-@{prop}: @value;
}
.border-radius(@radius) {
  .webkit-prefix("border-radius", @radius);
  .moz-prefix("border-radius", @radius);
  border-radius: @radius;
}
.box {
  .border-radius(10px);
}

That’s all the control and configuration you need in the world. Putting vars into properties was really only the missing step. So closing.

0reactions
seven-phases-maxcommented, Aug 16, 2014

@bassjobsen This was (relatively) recently discussed once more in still open #1917.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Automatically Update Prefix Lists - TechLibrary
Retrieve Prefix-list: Use bgpq3 ... Using bgpq3 , create a .txt file in the directory prefix-list.d/ for each AS-SET that you wish to...
Read more >
Change system generated Out of Office Prefix in Exchange ...
My customer wants to change the system generated prefix for out of office messages in Exchange Online. Is there a possibility to replace...
Read more >
Solved: Changing Prefix of a Table Auto Number. - ServiceNow
Solved: Hi all, I have a requirement to change the prefix of Auto number field in the table which I got from integration....
Read more >
Autoprefixer: A Postprocessor for Dealing with Vendor ...
Autoprefixer parses CSS files and adds vendor prefixes to CSS rules using the Can I Use database to determine which prefixes are needed....
Read more >
Replace prefixes in XML-message - Stack Overflow
If a prefix exists in the dictionary it is replaced. Testing this reader with an earlier ... Auto if you want to write...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found