-
Notifications
You must be signed in to change notification settings - Fork 19
Box shadow and border radius plugin updates #119
base: dev
Are you sure you want to change the base?
Conversation
Conflicts: plugins/boxshadow.php
…lobal property to '_all'.
Hi! The current behavior of the two plugins is meant to make them more robust. Browser sniffing is inherently unreliable and if, with your changes, Turbine failes to detect to browser correctly, the design suffers. Hovever some people might want to risk this to save some performance, so your idea has some merit. I think the best way to get your changes into Turbine would be to add it as optional behavior. In Turbine 1.1 plugins will have configuration options that work like this:
It would be useful to have your modified behaviour as such an option. Take a look at how the "noie" option is implemented in the box shadow plugin in dev: http://github.com/SirPepe/Turbine/blob/dev/plugins/boxshadow.php#L39 |
Hi SirPepe, Also this option would be shared by many of the plugins, so maybe it would be a good idea to be able to set the option globally? |
The gradient plugin will work without sniffing in version 1.1. We had to resort to sniffing because there was/is no way to put the same property into a single item multiple times.
The This of course sucks in its own way because it makes the whole output code much more bloated. So I think a global option would really be the best way to let people choose their poison: reliable bloated code or optimized browser-specific output. So... let's build this thing! |
Hey, so i have put together a proof of concept based on what we have been talking about. Check it out here: http://github.com/pieterv/Turbine/blob/dev/plugins/boxshadow.php I have called the option "vendorSpecific" im sure you can think of a better name? any ideas? I have a few questions around the plugin settings. Also in the example of the "noie" option it first check if the $settings variable is an array, do you think the Plugin::get_settings() function should handle this behavior rather than checking in every plugin? for example
Let me know what you think! |
I thought of "global settings" as a stting in the config.php, so it would be
and the more optimized
But "vendorSpecific" really isn't the right name... maybe " aggressiveOptimization" or something? |
i know this is super old, but the patch just became interesting to me. any chance to put this in a clean patch? there some irrelevant stuff in there, like config file. |
@commi are you still interested on it? I lost access to the Github repositories and saw your comment only now. |
Nope, i worked around the issues with the prefixes/filter i had in my own fork. |
I took a look at the network panel now, you got a lot of fixes. Do you want to merge them here? (: |
i would, but i also changed some behaviour that would require changes in the docs. mostly that ie-filters are not used if they can lead to ugly bugs, and priority for expire-headers instead of etags. i shall do that the next time i clean up my projects/repos, promise:) |
Ok! Thank you. I'm not lazy but I'm completely out of time to see this Igor Santos On Fri, Nov 2, 2012 at 1:14 PM, commi [email protected] wrote:
|
Currently the box shadow and border radius plugins output all vendor-specific syntax versions to all browsers, the changes i have made make it so the plugins just output the vender-specific version for the specific vender.
For example, perviously in firefox the rule of
box-shadow:2px 2px 8px \#000
would result in:box-shadow: 2px 2px 8px #000;
-moz-box-shadow: 2px 2px 8px #000;
-webkit-box-shadow: 2px 2px 8px #000;
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Color='#000000',Direction=135,Strength=2)";
filter: progid:DXImageTransform.Microsoft.Shadow(Color='#000000',Direction=135,Strength=2);
The update now will output:
box-shadow: 2px 2px 8px #000;
-moz-box-shadow: 2px 2px 8px #000;
And for webkit it will output:
box-shadow: 2px 2px 8px #000;
-webkit-box-shadow: 2px 2px 8px #000;