MyBB Community Forums

Full Version: Use a stylesheet for select2.css
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I suggest that rather than hardcoding the url to the select2.css in the templates that another stylesheet is added in the themes section of the ACP (rather like the thread_status.css or usercp.css).

This will make it easier to provide matching select2.css, especially for those forums with a flat or black theme. I know that an import url can be added at the top of the css, but using a stylesheet in the theme is more consistent imo and helps separate concerns and avoids the issues around @import.

http://stackoverflow.com/questions/10036...use-import
Can we get this bumped please.
+1 from me. Should really have been a stylesheet from the start.
(2016-04-27, 09:25 AM)Euan T Wrote: [ -> ]+1 from me. Should really have been a stylesheet from the start.

It would be extremely useful when creating a new theme since we already face screwing with JS for the editor theme.
I have used following workaround for the issue above:

<script type="text/javascript">
$(document).ready(function() {

  $("link[href*='select.css']").attr("href", rootpath + "/themes/theme" + {$theme['tid']} + "/select2.css");
});

</script>

and then move content from jscripts/select2/select.css to select2.css that you have created for your theme.
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2450

Thanks for contributing to MyBB!

Regards,
The MyBB Group