Yii Framework Forum: PHamlP V3 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

PHamlP V3 Haml and Sass Extension Rate Topic: -----

#1 User is offline   Yeti 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 30-May 09

Posted 29 August 2010 - 10:08 AM

PHamlP - the Haml and Sass extension - V3.0 is now available (download here).

Version 3 is fully compatible with Haml and Sass V3, and so brings some major updates - particularly to Sass - and is a recommended upgrade for all users.

  • Sass - Support for .sass (indented) and .scss (CSS style) syntaxes (note: the .sass syntax is not deprecated and will be fully supported

  • Sass - new syntax for variables and assignment:
    $foo: 5
    and
    $bar: 10 !default
    . !foo = 5 and !bar ||= 10 are deprecated and will generate a warning

  • Sass - @mixin and @include directives to define and use a mixin respectively. The '=' and '+' shortcuts are permitted in .sass files and are not deprecated; they are not allowed in .scss files

  • Sass - @extend directive allows selector inheritance by telling a selector to use the properties of another selector so keeping your page markup DRY.
    SCSS
    .error {
      border: 1px #f00;
      background: #fdd;
    }
    .error.intrusion {
      font-size: 1.3em;
      font-weight: bold;
    }
    
    .badError {
      @extend .error;
      border-width: 3px;
    }
    

    CSS (note the selector re-writing to include .badError where ever .error is used)
    .error, .badError {
      border: 1px #f00;
      background: #fdd;
    }
    
    .error.intrusion,
    .badError.intrusion {
      font-size: 1.3em;
      font-weight: bold;
    }
    
    .badError {
      border-width: 3px;
    }


  • SassScript - full support for all SassScript functions. Particularly useful are the new colour handling functions that allow you to work in HSL.
    Nesting of functions works as you would expect.
    SASS
    $my_bg_colour: #E6F2FF
    
    #yw1
      background: transparentize($my_bg_colour, 0.25)
      border: 5px solid transparentize(darken($my_bg_colour, 75%), 0.5)
      border-radius: 10px
      box-shadow: 10px 10px 5px #888
      margin: 1em
    


  • Sass - FireSass integration

  • Haml - HTML5 Custom Data Attributes

  • General - improved error reporting. Exceptions now give the location (filename and line number) of the error in the source and the source line


Credits
PHamlP is a port of Haml and Sass to PHP. All the genius comes from the people that invented and develop Sass; in particular:


The bugs are mine. Please report any found at http://code.google.c...mlp/issues/list
1

#2 User is offline   Yeti 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 30-May 09

Posted 01 September 2010 - 07:50 AM

V3.1 is now available.

This adds support for SassNumbers with complex units, and @import can now import multiple files.
0

#3 User is offline   Yeti 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 30-May 09

Posted 21 September 2010 - 06:18 AM

V3.2 is now available

This adds Compass as an extension to Sass.

It also fixes some SassScript parsing bugs, and HamlHelpers can now accept arrays as arguments.
0

#4 User is offline   Hes 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 10-July 11

Posted 10 July 2011 - 08:17 AM

I'm getting this error:

Undefined Variable: i: /Users/Hesedel/Sites/pajaroncreative.com/public_html/css/all.scss::54
Source: @while $i > 0


with this scss code:

@function whiten($color, $percent, $i: 1) {
	@while $i > 0 {
		$color: scale-color($color, $lightness: $percent);
		$i: $i - 1;
	}
	@return $color;
}


It worked fine before I used this extension. Please help me.
0

#5 User is offline   Alex Kireev 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 15-March 11

Posted 17 July 2011 - 07:16 AM

How to use compass
I put this
@import compass/css3
in sass file, that doesn't work
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users