-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Pagination / Pager code review and better customizing (second try) #11747
Conversation
* make pagination more customizable by supporting variables for color, bg and border in all states (default, hover, active, disabled) * harmonize handling for inner 'a' and 'span' tags
…olor, bg and border in all states (default, hover, active, disabled) * deprecated variable '@pager-disabled-color', because it is now a 'duplicate' of a pagination variable '@pagination-disabled-color' * harmonize handling for inner 'a' and 'span' tags
Not bad idea, but can be done much much simpler. |
I don't see an advantage to removing the default sizing from where the rest of the default component settings are being done. Just adds extra CSS. |
The advantage would be, that you have one way for defining size and only one place, where it is implemented. If you need a bugfix for that, you could do it at this one place. If someone have other idear of implementing it, he only need to replace the mixin. The rest of code could stay untouched. |
Could you please be more specific? |
Too many complications just for customizations. :P This just enlarges code base, could you try to reduce code? |
Please tell me how. Drop support for |
No, I'm just talking about your request, not general pagination code. |
I still not know how you will do it "much much simpler". It would be nice, if you could share your solution with us. |
Avoid that deprecation, avoid default state variables and improve pager I asked you to reduce code size because of this is like flood. 2013/12/9 Tobias Lindig [email protected]
Zlatan Vasović - ZDroid |
To follow the propagated name scheme, it looks like it does. For the default state you have default values. I can not see what is wrong with that. The extra (old) variables, that is for backward compatibility, is not shown in the compiled result. So I thing it is OK, how I did it.
In which direction?
But I can not see how, without loosing the support for customizing Pagination. BTW: I did this changes for my project and want give it back to the community, because I think it is an improvement. In my project I need a custom pagination. If you think, you can do it "much much simpler", your are welcome to do it and share it. From my point of view, this commit is ready. It is as short, clean and robust as I can do it. Take it, change it or leave it. |
Just merged #11840, so this conflicts with the new changes from that. I still don't see a point in the mixin for the base sizing, or the variable renaming since there's no contextual variation for the pagination like buttons or panels. |
Same code for same result. Want set size, do it in every case in same way.
I thought this is the wanted naming scheme.
It seams, that I mixed up "state" and "pseudo state". Sorry, my fault. But the main benefit of this request you did not see. The consequent customizing support for pagination and bug fixing. I will try it a second time and split it in different small commits. |
Awesome, I'll keep an eye out for them. Again, always appreciate folks following up in case I missed something, so keep it up.
Yeah, not a huge deal. My point, to be clear, is the variables added the |
Good so far. |
@mdo One more question about naming scheme for variables. What is the correct name for a variables that specify a border color? In variables.less I can found:
but also
Is there a rule for when to take "border" and when "border-color"? |
No. It should be 2013/12/20 Tobias Lindig [email protected]
Zlatan Vasović - ZDroid |
So if I want add new variables, I should use So if in one component just one border color defined, and I want add new ones for different states, should I rename the old one to prevent name scheme breaks in one and the same component? Or is it better to use the wrong scheme and wait for v4? |
-border-color is ok. Ask Mark Otto for more details, I don't know what he 2013/12/20 Tobias Lindig [email protected]
Zlatan Vasović - ZDroid |
Reviewed Pagination and Pager.
For Pagination:
For Pager:
This is a replacement of pull request #11684