
[Define New Theme] 13. All JS needs to be completely abstracted from the template files.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Re: [Define New Theme] 13. All JS needs to be completely abstracted from the template files.
Add a related Ticket to this discussion.
Basically when editing the theme currently I have to make sure that the classes are not connected to some sort of JS when making modifications that might break both JS and CSS.
This is extremely confusing and not Ideal so I proposed reference js-hook_name only in the JS and not applying any styles to them so that we can tell on the surface whats what. This should drastically speed up the development workflow for the themes
Basically when editing the theme currently I have to make sure that the classes are not connected to some sort of JS when making modifications that might break both JS and CSS.
This is extremely confusing and not Ideal so I proposed reference js-hook_name only in the JS and not applying any styles to them so that we can tell on the surface whats what. This should drastically speed up the development workflow for the themes
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: [Define New Theme] 13. All JS needs to be completely abstracted from the template files.
-1, if you're going to do something like that you should use data attributes.hanakin wrote:Add a related Ticket to this discussion.
Basically when editing the theme currently I have to make sure that the classes are not connected to some sort of JS when making modifications that might break both JS and CSS.
This is extremely confusing and not Ideal so I proposed reference js-hook_name only in the JS and not applying any styles to them so that we can tell on the surface whats what. This should drastically speed up the development workflow for the themes
http://csswizardry.com/2014/03/naming-u ... -in-oocss/
Re: [Define New Theme] 13. All JS needs to be completely abstracted from the template files.
either-way is fine as long as we stop double tapping selectors!callumacrae wrote:-1, if you're going to do something like that you should use data attributes.hanakin wrote:Add a related Ticket to this discussion.
Basically when editing the theme currently I have to make sure that the classes are not connected to some sort of JS when making modifications that might break both JS and CSS.
This is extremely confusing and not Ideal so I proposed reference js-hook_name only in the JS and not applying any styles to them so that we can tell on the surface whats what. This should drastically speed up the development workflow for the themes
http://csswizardry.com/2014/03/naming-u ... -in-oocss/
also that article is not about hooks but about css class names not having to be semantic to the content but the function of the class
https://github.com/csswizardry/CSS-Guidelines#js-hooks