[Define New Theme] 3. We need to use a pre-processor such as LESS or which ever is decided upon at least in development.

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.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.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1856
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [Define New Theme] 3. We need to use a pre-processor such as LESS or which ever is decided upon at least in developm

Post by DavidIQ »

phpdummie wrote:Unless you are intending to implement on-the-fly LESS compilation inside phpBB and distribute the less files as a part of the standard distribution...
We actually wouldn't distribute the LESS files in raw form. When the packages are prepared for distribution the LESS files would be taken care of so there wouldn't be any on-the-fly LESS compilation within phpBB. We already do something similar with the composer dependencies when the packages are prepared.
Image

phpdummie
Registered User
Posts: 7
Joined: Sat Nov 01, 2008 4:54 pm

Re: [Define New Theme] 3. We need to use a pre-processor such as LESS or which ever is decided upon at least in developm

Post by phpdummie »

Then why this need to make LESS a requirement? I can do whatever needs to be done in CSS directly, without using LESS. The end result is the same. Now, with LESS required, I have to go to the source files even for the smallest tweak. This will not make me any more efficient, actually... LESS!

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [Define New Theme] 3. We need to use a pre-processor such as LESS or which ever is decided upon at least in developm

Post by callumacrae »

phpdummie wrote:Then why this need to make LESS a requirement? I can do whatever needs to be done in CSS directly, without using LESS. The end result is the same. Now, with LESS required, I have to go to the source files even for the smallest tweak. This will not make me any more efficient, actually... LESS!
Because as good programmers, we like making stuff easier for ourselves.

I can use curl, but I use a web browser instead.
Made by developers, for developers!
My blog

phpdummie
Registered User
Posts: 7
Joined: Sat Nov 01, 2008 4:54 pm

Re: [Define New Theme] 3. We need to use a pre-processor such as LESS or which ever is decided upon at least in developm

Post by phpdummie »

callumacrae wrote: Because as good programmers, we like making stuff easier for ourselves.
That's fine as long as you don't make it harder for others.
As I just explained, using LESS would not make it any easier for me. Really, it would not.
callumacrae wrote: I can use curl, but I use a web browser instead.
Ha-ha! Thanks for sparing the "I can use my finger, but I use toilet paper" argument. :D

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 935
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [Define New Theme] 3. We need to use a pre-processor such as LESS or which ever is decided upon at least in developm

Post by hanakin »

phpdummie wrote:Then why this need to make LESS a requirement? I can do whatever needs to be done in CSS directly, without using LESS. The end result is the same. Now, with LESS required, I have to go to the source files even for the smallest tweak. This will not make me any more efficient, actually... LESS!
We are not making it a requirement for you to use less. The requirement again is for those assisting with the development of the software. as DavidIQ pointed out we would not be shipping less with the software. This is simpliy another tool for us to use in the development of the software no different than all the git-tools/test frameworks/travis/composer dependencies that we currently use on the development repo.
Donations welcome via Paypal Image

User avatar
wilkinsocks
Registered User
Posts: 5
Joined: Tue May 05, 2015 5:33 am
Location: United Kingdom

Re: [Define New Theme] 3. We need to use a pre-processor such as LESS or which ever is decided upon at least in developm

Post by wilkinsocks »

Using a pre-processor like sass would be advantageous during development due to the fact you can work on separate files for each section, keeping it much more organised, especially with version control etc.

also imo, the final theme should possibly have both LESS and SCSS available to give a potential theme developer an option between the two. But of course, developed in just one to avoid extra work.

CHItA
Development Team
Development Team
Posts: 162
Joined: Thu Mar 12, 2015 1:43 pm
Location: Budapest, Hungary

Re: [Define New Theme] 3. We need to use a pre-processor such as LESS or which ever is decided upon at least in developm

Post by CHItA »

hanakin wrote:*Note This is part 3 of a series found here

As the topics suggests this is a discussion form for how weather and how to move forward with the concept of CSS variables

With the introduction of a possible new spec in some of the modern browsers in the works, and the rampant popularity of CSS preprocessors. It is almost certain that whomever works on the theme will most likely work in some sort of pre-processor initially, being that the power of variables, functions, & mixins just to name a few are so powerful leading to cleaner, smaller, and more organized codebase.

The end result is still CSS, however; we need to decide if thats is all that we maintain or do we maintain the for example LESS files as well weather it be included in the download or maintained separately in order to allow for better maintainability.

With this being said the real questions are:

Which pre-processor do we use or start in?
Should this be included in the repo in a separate directory outside of the phpbb as a tool or included with the theme it self?

My opinion is that it is a definite certainty that pre-processors be used, but when it comes to maintaining the theme I am drawn. I am not sure one-way or the other how best to maintain it. This is one of the many reasons why I feel that the theme should be its own project and stable versions merged prior to releases of PHPBB, but that is probably a separate topic of discussion.

Thoughts & Suggestions?
In my opinion, if you use a pre-processor that has a JS parser for live parsing, it probably could be added to the dev repo, or added by composer, and then the repo could contain only the LESS files which can be compiled when releasing. Not sure, but adding different assets depending on the environment should be pretty easy with TWIG.

Post Reply