[Pushed] Use a stylesheet for select2.css
#1
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
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#2
Can we get this bumped please.
Reply
#3
+1 from me. Should really have been a stylesheet from the start.
Reply
#4
(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.
Reply
#5
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.
Reply
#6
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)