Position of select2 drop down

More
10 years 1 month ago #53193 by jrodgar
I wanted to modify the select2, so the options and the input finish at the right on the same place

Nowadays, I can´t override the flexicontent style for width
Code:
/***************************************/ /* Drop-down value-selection container */ /***************************************/ .select2-drop { /*min-width: 400px!important;*/ width: auto !important; float: left !important; width: auto !important;

Because I want to use the inline calculated width.

I can´t disable select2 from flexicontent because this will removed added behaviours like the inner labels behaviour

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #53198 by ggppdk
Hello

-- about aligning the container right that would be desirable if you make some CSS you can give it back here



-- make a more specific rule by adding "body" or other in front of the rules




in any case you should use the updated v2.2.1 or later,

since select2 in its newer version JS has changed some CSS classes


-- in v3 BETA5a+ it is possible to disable select2 JS in select/selectmultiple fields without a problem, we may add global parameter for backend / frotend,


but since select-multiple form fields take too much space, it is unlikely (frontend but backend too) it is unlikely to have a good result without JS to style them


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #53210 by jrodgar
- Aligning the options container right with the input is the default behaviour by select2. is made with inline styles
- A more specific rule is not the problem. I need to use the one asigned inline via select2.js, but is override with the flexicontent custom select2.css

- Updating for me is not an option now, but I´ll check it when possible

- I don´t need to remove the select2 styles. The problem is that the custom ones added for flexi override the normal behaviour. Maybe this was because the normal behaviour would cut the options into two lines if too wide, and that was undesirable

- My current solution is unsetting libraries/select2.css from head stylesheets (on templates and modules), and adding a clean select2.css with the same version you are using. I tried first using plain css with no luck, and simple javascript (I could disable flexi-select2.js altogether and replicate it via my custom code, but what for? :P )

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #53214 by ggppdk
Hello
Code:
Aligning the options container right with the input is the default behaviour by select2. is made with inline styles



some of these (positioning) are added by select2 Javascript, maybe we cannot change without hacking the select2 code

if you have a solution, (without hacking select2 JS) then post it here,


also you could visit select2 JS home/forum/github repository and make a feature request there


Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #53217 by jrodgar
I think that we are misscommunicating :)


This, is what I get when I load the downloaded select2.css from github
[attachment=1:3fcckry3]<!-- ia1 -->select2_correct.PNG<!-- ia1 -->[/attachment:3fcckry3]

This is what I get when I load flexicontent/libraries/select2.css
[attachment=2:3fcckry3]<!-- ia2 -->select2_wrong.PNG<!-- ia2 -->[/attachment:3fcckry3]


The problem is in the flexi modifications. Don't know if it keeps happening on the new versions, but in my version, the problematic line is something like this one github.com/FLEXIcontent/flexico ... 2.css#L729

You can see here, that this rule overrides the inline styles added via select2.js
[attachment=0:3fcckry3]<!-- ia0 -->problematic_css.PNG<!-- ia0 -->[/attachment:3fcckry3]

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7
Attachments:

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #53218 by ggppdk
Hello

please correct your signature

are you talking of FLEXIcontent v3 BETA4c/BETA5a in backend without any othe CSS loaded ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.363 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save