-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
backward-compatibility prefixing (and try to understand the gradient mixins) #13643
Comments
My understanding is that we won't be adding any new calls to the vendor prefix mixins, as they're deprecated, and unnecessary with Autoprefixer. However, for backward compatibility, we won't remove any existing calls to the vendor prefix mixins until v4. |
To clarify, do you mean that the final CSS (with Autoprefixer enabled) is still missing prefixes? |
(3) might be a legitimate bug. Please open a separate issue for it. Thanks. |
|
WebKit/Blink apparently doesn't need the change in box-sizing, see necolas/normalize.css#289. |
@cvrebert thanks for your response. I will post a new issue for the gradient mixins. For both point 1 and 2, i don't agree with your opinion, i think they are all "bugs" / "missings" which should be fixed before you can guarantee backward compatibility. This fixes are needed to give the current 3.1.1. the browser support as promised. @hnrch02 the bootstrap team should chose here. Support the prefixes of autoprefixer or make a difference for normalize.css. i think the process should be done in two steps:
After step 1 and 2 new code can be written add without prefixes (and prefixed with autoprefixer). Creating a consistent less/vendor-prefixes.less also opens the option to generate that prefixes automatically instead of prefixing the final css. I agree that using single line w3c property declarations only (and prefix the final css) will be more intuitive than using mixins from less/vendor-prefixes.less every where. |
to illustration the current inconsistency: See navbar.less ( both the latest develop version and 3.1.1 ) For the the The contribution notes now tell me: "Don't add vendor prefixed properties to their unprefixed counterparts (e.g., only box-sizing and not also include -webkit-box-sizing), as this is done automagically at build time." What do you expect if someone writes a PR for navbar.less? |
The Autoprefixer fixes this issue and adds the |
The inconsistency is admittedly annoying, but as long as the pre-Autoprefixer version also didn't use a vendor prefix mixin, then it's still backward-compatible; in this particular example, regardless of whether you actually use the Autoprefixer or not, the browser compatibility of the v3.2.0 code is the same or greater than the old code. |
Currently I found doing what is deprecated, using and extending the mixins in |
Yup, that's probably your best option at this point. |
@mdo Could you double-check whether our |
@mdo Ping regarding ^^^ |
Yup, gradient syntax in the |
Anything else here needing immediate fixing? If so, perhaps we break out into separate issues and clarify anything else that needs addressing? |
IMHO, we're done here now that you've sorted out the gradient mixins. |
…yntax in horizontal gradients
Based on #13620 i compared the output with and without autoprefixing.
-webkit-box
prefixes missing in the current less code. For instance innomalize.less
thehr
ruleset has no-webkit-box
prefix. How should this be fixed? It seems the following code could fix this:hr { .box-sizing(content-box); height: 0; }
But the preceding code uses the deprecated code from
vendor-prefixes.less
. How should this be done?I found the
-webkit-box
prefix missing eight times. An other example is thebod-shadow
for thekbd
ruleset incode.less
Again is fixing this by calling the.box-shadow
mixin fromvendor-prefixes.less
allowed or not?progress-bar-stripes
inprogress-bars.less
is not prefixed. Suggested solution to add the following code toless/vendor-prefixes.less
:And in
progress-bars.less
call the above mixin with:This solution is based on: less/less.js#1640 by @wallaroo
I don't understand the following code:
background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent));
As i understand the
color-stop()
should be use with the-webkit-gradient
prefix and not with-webkit-linear-gradient
, also is not clear:-why does it uses the
color-stop()
twice and notto()
-why does the
.vertical
mixins don't have this rule (but usesbackground-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);
)Running the current
#gradient > .horizontal
trough the autoprefixer generates a second :-webkit-linear-gradient
similar withbackground-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);
which compiles into for instance:
In accordance with the autoprefixer rules i think the
.horizontal
mixins should look like that shown below:The above code has still one issue. With the default values of 0 and 100% auto prefixer adds a second
-webkit-gradient
prefix with no percentages (due to 0 and 100 are default) and doesn't remove the first-webkit-gradient
in that case the compiled css will look like that shown below:The text was updated successfully, but these errors were encountered: