mirror of
https://github.com/hanzoai/postcss.git
synced 2026-09-24 17:01:56 +00:00
20 lines
391 B
CoffeeScript
20 lines
391 B
CoffeeScript
# Property with raw value (with comments)
|
||
class Raw
|
||
# Return Raw only if it necessary
|
||
@load: (value, raw) ->
|
||
if raw? and value != raw
|
||
new Raw(value, raw)
|
||
else
|
||
value
|
||
|
||
constructor: (@value, @raw) ->
|
||
|
||
# Stringify to CSS raw value if trimmed wasn’t changed
|
||
toString: ->
|
||
if @changed
|
||
@value || ''
|
||
else
|
||
@raw || @value || ''
|
||
|
||
module.exports = Raw
|