artlantis / phamlp

Automatically exported from code.google.com/p/phamlp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No documentation on how to use Compass

GoogleCodeExporter opened this issue · comments

What is the expected output? What do you see instead?
I'd like to find documentation on how to use Compass features.
There seems to be none.

Original issue reported on code.google.com by egecan on 29 Jan 2011 at 11:26

See also #67 - Extension could not be found

Where do you stuck? Which phamlp version do you use? Which php framework?

Original comment by sebastia...@gmail.com on 4 Feb 2011 at 10:13

I simply didn't know that I have to use an array to call an extension. I still 
don't understand where exactly should I put 'array('Compass' => array())'. I 
use CodeIgniter with the latest release of phamlp. I call the parser like:

$css = new SassParser(array('style'=>'compressed', 'cache' => true, 
'vendor_properties'=> true));
echo $sass->toCss('styles.scss');

I simply can't find the parameter that takes the extension array and loads them.

Original comment by egecan on 4 Feb 2011 at 10:27

I'm using CakePHP and I'm not familiar with CodeIgniter. But maybe it helps:

My calls are basically:

$parser = new SassParser(array('style' => 'compressed', 'cache_location' => 
'./sass-cache', 'extensions' => array('Compass' => array())));
echo $parser->toCss('style.scss');

(with patch of issue #67)

Original comment by sebastia...@gmail.com on 4 Feb 2011 at 2:13

'extensions' => array('Compass' => array())

that's exactly what I was looking for... where is that extensions parameter 
mentioned? anyway, I'll test it tonight and report back (with the patch 
applied, and without...)

Original comment by egecan on 4 Feb 2011 at 2:47

Hi,

I have the following code in PHP.
$sass = new SassParser(array('style'=>'nested','extensions' => array('Compass' 
=> array())));          
$css = $sass->toCss('mytest.scss');     

and within the scss file: 
@include opacity(0.6);

but an error message appear (Undefined Mixing). I have a simple question. How 
do you use the mixings of the loaded extension compass? No samples are provided 
anywere. 

Thanks in advance!

Original comment by p4tricio...@googlemail.com on 12 Jan 2012 at 1:04

Now you should be able to use it. Just specify imports and includs in your 
.scss,
in case with opacity, the following code is required:
@import "compass/../css3";

...

div {
@include opacity(0.6);
}

On my local works perfect!

Original comment by romay...@gmail.com on 19 Jul 2012 at 10:47

Not work for me.
Fatal error: Class 'SassExtentionsCompassConfig' not found in 
/path_my_site_base/phamlp/sass/SassParser.php on line 300

Original comment by sergej_s...@eyrini.ru on 21 Nov 2012 at 11:21

[deleted comment]
[deleted comment]
Everything is fine! Finally figured out. You need to change the line 
'extensions' => array ('Compass' => array ()) to change the case of the first 
letter of expansion, to get the: 'extensions' => array ('compass' => array ()).

Now @import "compass" includes extension! True expansion must also bring to 
mind.

For the Russian audience:

Всё отлично! Разобрался наконец. Нужно в 
строке 'extensions' => array('Compass' => array()) изменить 
регистр первой буквы расширения, чтобы 
получилось: 'extensions' => array('compass' => array()).

Теперь @import "compass" задействует расширение! 
Правда расширение нужно ещё доводить  до 
ума, в чём выражается, хотя бы, отсутствие 
файла _gradient.scss. Да и вообще PhamlP 3.2 глючный, в 
отличие от CSS3, когда ждать стабильной 
версии неизвестно.

Original comment by sergej_s...@eyrini.ru on 23 Nov 2012 at 2:55

It looks buggy to me, specially if working with dynamic media queries, string 
interpolation and other complex stuff. 
I have played a bit with it, but would not recommend. At the end of the day, 
it's better to use initial SASS/Compass or Stylus. 
Simply install Ruby -> install Compass -> Use SASS/Compass -> have fun :-)

Original comment by romay...@gmail.com on 23 Nov 2012 at 5:36

Chris Epstein gave her a lot of time, measured in months to Sass works on PHP. 
Perhaps this was done to compare the two programming languages​​, PHP and 
Ruby, but the conclusion to which he came, is not known, we can only assume, 
PHP him less attracted.

Sass PHP misleads many, for sure. It is time to understand that many people 
wishing to use it, or someone has to take over for its development, instead of 
typing CSS code.

Ruby is good, but it will take time for its development to create designs as 
quickly as in the environment to which is used to.

Stylus like not so developed as the Less. Development and support of Less PHP 
is quite active, and it is very much like Sass.

For the Russian audience:

Крис Эпштайн отдал уйму своего времен, 
измеряемого месяцами, чтобы Sass работал и на 
PHP. Наверное это было сделано для сравнения 
двух языков программирования, PHP и Ruby, но к 
какому выводу он пришёл, пока не известно, 
можно лишь предположить, PHP ему меньше 
приглянулся.

Sass PHP вводит в заблуждение многих, 
наверняка. Пора дать это понять многим 
желающим его использовать, или кто-то 
должен принять эстафету по его развитию, 
вместо того, чтобы печатать CSS код.

Ruby это хорошо, но потребуется время на его 
освоение, чтобы создавать проекты так же 
быстро, как в той среде, к которой привык.

Stylus вроде не так развит как Less. Разработка и 
поддержка Less PHP достаточно активна, и очень 
уж он напоминает Sass.

Original comment by sergej_s...@eyrini.ru on 23 Nov 2012 at 6:52