Closed (won't fix)
Project:
Skinr
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2012 at 19:03 UTC
Updated:
27 Apr 2013 at 12:25 UTC
Hi!
I suggest to add text field to available form elements (`type` skin property). The contents of the field should be added to the corresponding class name. This would be useful for applying complex CSS stuff like nth-child, not, content and so on.
I've got a real-life situation where i need to apply `nth-child(3n+5)` via Skinr. To introduce all possible nth-child expressions for the user, i have to generate an enormous list of Skinr options via PHP. It would be way simplier to let the user input the expression into a text field.
Comments
Comment #1
moonray commentedYou can probably achieve this by adding a 'form callback' to your skin info. A simple example of how this works:
Note that I haven't tested this with a textfield, and there might be issues due to your not being able to provide a list of option in the skin definition.
There's also always the 'advanced' tab which allows you to enter freeform classes.
Comment #2
moonray commentedBesides the usage example of how you could implement this, I don't believe Skinr should allow you to enter any CSS. This should be done in css files includes.
Skinr's purpose is to add CLASSes only.