Feature #3725

CSS Engine

Added by Sebastian Kurfuerst over 11 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Could have
Category:
ViewHelpers
Target version:
-
Start date:
2009-06-22
Due date:
% Done:

0%

Estimated time:
Has patch:
No

Description

It would be great to have a CSS engine like lesscss, or integrate css cacheer.

http://lesscss.org/index.html
http://www.shauninman.com/archive/2008/05/30/check_out_css_cacheer

This idea was originally proposed by Jens Hoffmann, and I think it can be fully realized as ViewHelpers.

Greets,
Sebastian

#1

Updated by Christian Müller over 11 years ago

  • Assignee set to Christian Müller

I will try to convert the CSS Cacheer into a ViewHelper. LessCSS looks nice (especially syntax) but all the features are also in CSS Cacheer and it seems easier to me, because it is already PHP. Maybe we can transfer the syntax to CSS Cacheer in a second step.

#2

Updated by Sebastian Kurfuerst over 11 years ago

  • Target version set to 1.0

Hi Christian,
that sounds really like a good plan! I'd suggest you'd develop the ViewHelper for FLOW3 first, and then we'll see if we can include it in the automatic backporting.

Greets,
Sebastian

#3

Updated by Robert Lemke over 11 years ago

  • Target version deleted (1.0)
#4

Updated by Sebastian Kurfuerst over 9 years ago

  • Tracker changed from Feature to Story
  • Priority changed from Should have to Could have
#5

Updated by Sebastian Kurfuerst over 9 years ago

  • Tracker changed from Story to Feature
#6

Updated by Jacob Floyd over 8 years ago

If you're going to make a "CSS Engine", make an interface type thing that makes it easy to implement other css pre-processors as well. I've seen both LESS and SASS used by various TYPO3 community members. Cacheer might be interesting too.

I'd imagine that the ViewHelper could either process stuff itself (allowing for inclusion of Fluid Variables and other ViewHelpers) or just pass the files off to an external processor (maybe a command line utility for less or sass), or maybe it could include a javascript file to compile the css in Developer context, but it pre-compiles the css in production context.

How would that work? I dunno. Maybe one of these (or some combination):
everything in a directory:

<f:css directory="Resource://Private/Stylesheets/less/" type="less"/>
<f:less directory="Resource://Private/Stylesheets/less/"/>
<f:sass directory="Resource://Private/Stylesheets/sass/"/>
<f:css.less directory="Resource://Private/Stylesheets/less/"/>
<f:css.sass directory="Resource://Private/Stylesheets/sass/"/>

Or per file:
<f:css resource="Resource://Private/Stylesheets/less/layout.less" type="less"/>
<f:less directory="Resource://Private/Stylesheets/less/layout.less"/>
<f:sass directory="Resource://Private/Stylesheets/sass/layout.scss"/>
<f:css.less directory="Resource://Private/Stylesheets/less/layout.less"/>
<f:css.sass directory="Resource://Private/Stylesheets/sass/layout.scss"/>

Or included directly
<f:css.cacheer>
@base(baseName)
{
    propertyName: {myCoolFluidVariable};
    propertyName: propertyValue;
    propertyName: propertyValue;
}
</f:css.cacheer>

I think I like the "css.{engine}" syntax best - it feels most FLOW3ish. css.less, css.sass, css.cacheer...

#7

Updated by Jacob Floyd over 8 years ago

Or, instead of using:

<f:css.{engine}.../>

Perhaps this would make more sense:
<f:style.{engine}.../>

#8

Updated by Lorenz Ulrich almost 7 years ago

Has there been any progress on this feature?

#9

Updated by Christian Müller almost 7 years ago

  • Has patch set to No

No this could be tackled again after the reworked resource management is merged. https://review.typo3.org/#/q/status:open+topic:resource-management,n,z

Also available in: Atom PDF