Changelog for NovaSheets
- 1.0.0 • 1.0.1 • 1.0.2 • 1.0.3 • 1.0.4 • 1.0.5 • 1.0.6 • 1.0.7 • 1.0.8
- 1.0.0-pre1 • 1.0.0-pre2 • 1.0.0-pre3 • 1.0.0-pre4 • 1.0.0-rc1 • 1.0.0-rc2 • 1.0.0-rc3 • 1.0.0-rc4 • 1.0.0-rc5 • 1.0.0-rc6 • 1.0.0
- 0.6.0 • 0.6.1 • 0.6.2 • 0.6.3 • 0.6.4 • 0.6.5 • 0.6.6 • 0.6.7
- 0.5.0 • 0.5.1 • 0.5.2
- 0.4.0 • 0.4.1 • 0.4.2 • 0.4.3 • 0.4.4 • 0.4.5 • 0.4.6 • 0.4.7
- 0.3.0 • 0.3.1 • 0.3.2 • 0.3.3 • 0.3.4 • 0.3.5
- 0.2.0 • 0.2.1
- 0.1.0 • 0.1.1 • 0.1.2
1.0.8
2023-08-01
- Fixes
- [General] Fixed a crash occurring when invoking NovaSheets.
- [CLI] Fixed input from piped stdin not being parsed.
1.0.7
2023-07-20
- Changes
- [General] Changed output of the CLI
--helpand--versioncommands.
- [General] Changed output of the CLI
- Fixes
- [Scripting] Fixed the
parse()function not working when used in browser.
- [Scripting] Fixed the
1.0.6
2021-07-27
- Changes
- [Scripting] Changed browser file imports to be asyncronous using
fetchinstead ofXMLHttpRequest.
- [Scripting] Changed browser file imports to be asyncronous using
- Fixes
- [Syntax] Fixed newlines breaking parsed comments.
- [Syntax] Fixed simple breakpoints inside parsed comments being parsed incorrectly.
- [Syntax] Fixed empty blocks being removed from the output.
- [Syntax] Fixed duplicate media queries being condensed incorrectly.
- [Scripting] Fixed browser file imports crashing the parser when unavailable.
1.0.5
2021-07-24
- Fixes
- [Syntax] Fixed the parser crashing when it comes across a child selector.
- [Syntax] Fixed multiple substitutions of the same variable containing a CSS block outputting garbage.
1.0.4
2021-07-24
- Fixes
- [Syntax] Fixed multiple instances of block substitution of the same selector not being parsed.
- [Syntax] Fixed multiple substitutions of the same variable not being parsed together.
- [Syntax] Fixed parent element substitutions in child selectors of simple breakpoints not being trimmed properly.
1.0.3
2021-07-19
- Removals
- [Syntax] Removed parser option
MAX_RECURSION.
- [Syntax] Removed parser option
- Fixes
- [Syntax] Fixed slashes inside CSS attributes
font-*andgrid-*being treated as division.
- [Syntax] Fixed slashes inside CSS attributes
1.0.2
2021-07-12
- Changes
- [Syntax] Changed output indentation to more closely follow input indentation.
- [Syntax] Changed output to merge duplicate media selectors.
- [CLI] Changed input path parsing to imply file extension of
.nvssif unset.
- Fixes
- [Syntax] Fixed comments in CSS output being duplicated over child selectors.
- [Syntax] Fixed nested media queries not working.
1.0.1
2021-07-03
- Changes
- [CLI] Revamped CLI usage, which now allows unprefixed command names (e.g.,
novasheets helpcan now be used instead ofnovasheets --help).
- [CLI] Revamped CLI usage, which now allows unprefixed command names (e.g.,
- Fixes
- [Syntax] Fixed keywords
@varand@endvarnot being parsed properly when not separated from other content by newlines. - [Syntax] Fixed superfluous whitespace being added to CSS output.
- [Syntax] Fixed parser option
DECIMAL_PLACESnot being applied to all applicable values. - [Syntax] Fixed at-rules being prefixed with erroneous ampersands.
- [Scripting] Fixed custom options not being applied.
- [Functions] Fixed
@eachand@repeatnot treating whitespace properly.
- [Syntax] Fixed keywords
1.0.0
2021-06-19
The full release of NovaSheets!
The following changelog is as compared with 0.6.7. For the changes since the last release candidate, see the 1.0.0-release section.
- Additions
- [Syntax] Added CSS nesting, using
&to refer to the parent selector explicitly. - [Syntax] Added parser constant
BUILTIN_FUNCTIONSfor controlling whether or not to implement built-in functions. - [CLI] Added support for reading syntax from piped stdin.
- [CLI] Added
[<command>]option tonovasheets --helpto display help for a given command. - [Scripting] Added an API for adding custom NovaSheets functions using class
NovaSheetswith methodaddFunction(name, function), where the first argument offunctionis the matched content and the remainder are variable arguments. - [Scripting] Added a second parameter to
parsefor passing through a class with custom functions. - [Scripting] Added a third parameter to
compilefor passing through a class with custom functions.
- [Syntax] Added CSS nesting, using
- Removals
- [Syntax] Removed parser constants
MAX_MATH_RECURSIONandKEEP_NAN. - [Syntax] Removed previous and parent selectors,
%an&, as this usage is now accomplished by nesting. - [Syntax] Removed item slicer
<.
- [Syntax] Removed parser constants
- Changes
- [Syntax] Changed parser constant keyword from
@constto@option. - [Syntax] Changed function names to be case insensitive.
- [Syntax] Changed media query output to not condense duplicated queries as it sometimes broke output.
- [CLI] Changed compilation to require using the
--compile/-cflag. - [Scripting] Changed
compilefunction to be asyncronous. - [Functions] Changed math functions to return just their argument when invalid.
- [Functions] Changed built-in color functions to no longer output console warnings for invalid colors.
- [Syntax] Changed parser constant keyword from
- Fixes
- [Syntax] Fixed object substitution not working due to selectors not being trimmed.
- [Syntax] Fixed small numbers receiving incorrect decimal places.
- [Syntax] Fixed negative exponents not being parsed.
- [Syntax] Fixed hexadecimal colours not being coerced.
- [Functions] Fixed
@booleantreating pipes as argument separators. - [Functions] Fixed
@booleannot having its output value coerced intotrue/false. - [Functions] Fixed value
NaNnot being checked properly. - [Security] Fixed a code injection issue using built-in boolean functions.
- Internal
- [Source] Rewrote source code in TypeScript.
1.0.0 (release)
2021-06-19
- Changes
- [Scripting] Changed
compilefunction to be asyncronous.
- [Scripting] Changed
- Fixes
- [Syntax] Fixed parent selectors substituted using
¬ being trimmed. - [Syntax] Fixed nested selectors being outputted out of order.
- [Syntax] Fixed object substitution not working due to selectors not being trimmed.
- [Functions] Fixed
@breakpointoutputting invalid selectors when nested. - [Functions] Fixed
@booleannot having its output value coerced intotrue/false.
- [Syntax] Fixed parent selectors substituted using
1.0.0-rc6
2021-06-12
- Additions
- [CLI] Added
[<command>]option tonovasheets --helpto display help for a given command.
- [CLI] Added
- Removals
- [Syntax] Removed parser constants
MAX_MATH_RECURSIONandKEEP_NAN.
- [Syntax] Removed parser constants
- Fixes
- [Syntax] Fixed variables containing braces/blocks breaking the parser.
- Internal
- [Source] Replaced math parsing code with package
math-and-unit-parser. - [Source] Replaced nesting compilation code using package
balanced-match. - [Source] Replaced browser building code with package
webpack.
- [Source] Replaced math parsing code with package
1.0.0-rc5
2021-05-29
- Changes
- [Syntax] Changed function names to be case insensitive.
- [Syntax] Changed media query output to not condense duplicated queries as it sometimes broke output.
- Fixes
- [Syntax] Fixed vanilla CSS functions being incorrectly parsed.
- [Syntax] Fixed simple breakpoints not being a valid sole child selector.
1.0.0-rc4
2021-05-29
- Changes
- [Syntax] Changed simple breakpoints to not output
only screen.
- [Syntax] Changed simple breakpoints to not output
- Fixes
- [Syntax] Fixed vanilla CSS functions not being parsed when containing NovaSheets content.
- [Syntax] Fixed CSS
calc()functions not being parsed properly. - [Syntax] Fixed comments being duplicated over child selectors.
- [Functions] Fixed
@breakpointfunction not being able to be used in a child selector by making it use simple breakpoints.
1.0.0-rc3
2021-05-22
- Changes
- [Syntax] Changed comma-separated parent selectors to have each selector part distributed over its children.
- Fixes
- [Syntax] Fixed CSS
calc()functions incorrectly having brackets removed. - [Syntax] Fixed the
/separator in vanilla CSS color functions being treated as a division operator. - [Syntax] Fixed constructs like
0 -1embeing treated as subtraction. - [Syntax] Fixed spaced double negatives not being parsed as math.
- [Syntax] Fixed CSS
1.0.0-rc2
2021-05-18
- Changes
- [Syntax] Changed CSS
calc()functions to be static with math operations unparsed.
- [Syntax] Changed CSS
- Fixes
- [Syntax] Fixed nested selectors sometimes not having their parent selectors parsed.
- [Syntax] Fixed block substitution not working on nested selectors.
1.0.0-rc1
2021-05-16
- Changes
- [Syntax] Changed simple breakpoint output to remove duplicate media queries.
- Fixes
- [Syntax] Fixed nested selectors having only a maximum of two selectors when flattened.
- [Syntax] Fixed regular at-rules being malformed in the output.
- [Syntax] Fixed simple breakpoints not working for blocks containing line breaks.
1.0.0-pre4
2021-04-04
- Additions
- [Syntax] Added CSS nesting, using
&to refer to the parent selector explicitly. - [CLI] Added support for reading syntax from piped stdin.
- [Syntax] Added CSS nesting, using
- Removals
- [Syntax] Removed previous and parent selectors,
%an&, as this usage is now accomplished by nesting. - [Syntax] Removed item slicer
<. - [Scripting] Removed option
nonest.
- [Syntax] Removed previous and parent selectors,
- Changes
- [Scripting] Renamed option
notrimtotrim(inverting its usage) andallargstoallArgs. - [Functions] Changed math functions to return just their argument when invalid.
- [Scripting] Renamed option
- Fixes
- [Syntax] Fixed small numbers receiving incorrect decimal places.
- [Functions] Fixed various errors relating to incorrect type assumptions in built-in functions.
- [Functions] Fixed built-in function
$(@boolean)treating pipes as argument separators. - [Functions] Fixed built-in functions not checking
NaNproperly. - [Security] Fixed a code injection issue using built-in boolean functions.
- Internal
- [Scripting] Added type definitions for exported functions.
1.0.0-pre3
2021-03-06
- Fixes
- [CLI] Fixed command-line usage not working.
- [General] Fixed conflicting files being published to npm.
1.0.0-pre2
2021-03-06
- Fixes
- [Syntax] Fixed negative exponents not being parsed.
- [Syntax] Fixed hexadecimal colours not being coerced.
- [Syntax] Fixed various errors relating to incorrect type assumptions.
- Internal
- [Source] Rewrote source code in TypeScript.
1.0.0-pre1
2021-01-25
- Additions
- [Scripting] Added an API for adding custom NovaSheets functions using class
NovaSheetswith methodaddFunction(name, function), where the first argument offunctionis the matched content and the remainder are variable arguments. - [Scripting] Added a second parameter to
parsefor passing through a class with custom functions. - [Scripting] Added a third parameter to
compilefor passing through a class with custom functions. - [Syntax] Added parser constant
BUILTIN_FUNCTIONSfor controlling whether or not to implement built-in functions.
- [Scripting] Added an API for adding custom NovaSheets functions using class
- Changes:
- [CLI] Breaking: Compiling NovaSheets files must now be done explicitly using the
--compile/-cflag. - [Syntax] Breaking: Changed parser constant keyword from
@constto@option. - [Syntax] Changed built-in color functions to no longer output console warnings for invalid colors.
- [CLI] Breaking: Compiling NovaSheets files must now be done explicitly using the
0.6.7
2021-01-17
- Additions
- Added glob support to the
--compilecommand. - Added console messages for successfully compiled files.
- Added glob support to the
- Changes
- Changed simple breakpoint maximums to be exclusive, allowing the same number to be used in two separate selectors without clashes.
- Changed built-in function
@breakpointto offset the maximum size by −1 instead of the minimum size by +1.
- Fixes
- Fixed
--compileusage throwing an error when given an extensionless input filename, an implicit output filename, or a nonexistent directory in its output file path. - Fixed command-line usage throwing an error because of browser-only code.
- Fixed parser constant
KEEP_UNPARSEDnot working.
- Fixed
0.6.6
2021-01-03
- Additions
- Added parser constant
KEEP_UNPARSEDwhich controls whether or not to keep unparsed variables in the output (defaults tofalse).
- Added parser constant
- Changes
- Changed simple breakpoints to only allow spaces and ellipsis as delimiters due to interference with CSS selectors.
- Changed simple breakpoints to work with previous element selectors.
- Changed math unit simplifications to shorten sets of 100cm and 1000mm to 1m.
- Fixes
- Fixed the parser crashing when built-in function
@repeatwas missing itsdelimiterparameter.
- Fixed the parser crashing when built-in function
0.6.5
2021-01-02
- Additions
- Added simple breakpoints, done by placing
@[<min>][..][<max>]directly after a CSS selector but before the block content. - Added built-in function
@uncapitalizeto set the initial letter of a string to lowercase. - Added aliases
@darken,@lighten, and@desaturatefor built-in functions@shade,@tint, and@tonerespectively.
- Added simple breakpoints, done by placing
- Removals
- Removed built-in function
@camelcasedue to its unintuitive behavior and its use case being superceded by@titlecasecombined with@uncapitalize.
- Removed built-in function
- Changes
- Changed built-in function
@repeatto allow adelimiterparameter. New syntax:$( @repeat | <amount> | [<delimiter>] | <content> ).
- Changed built-in function
0.6.4
2020-11-14
- Additions
- Added object content substitution, which substituted all property-value pairs, done by placing an exclamation point (
!) after an object:{attr: val;}!.
- Added object content substitution, which substituted all property-value pairs, done by placing an exclamation point (
- Changes
- Changed the object item substitution notation to use angle brackets instead of square brackets to avoid interfering with CSS attribute selectors, changing the format from
{attr:val}[attr]to{attr:val}<attr>.
- Changed the object item substitution notation to use angle brackets instead of square brackets to avoid interfering with CSS attribute selectors, changing the format from
- Fixes
- Fixed exponent notation applying to hexadecimal colors.
0.6.3
2020-09-12
- Additions
- Added declaration substitution, which outputs the contents of a CSS block declaration, using the format
$<selector>. - Added object notation, used by placing square brackets after a set of attribute-value pairs (which is the same as a CSS block) surrounded by curly brackets:
{attr1: val1; attr2: val2;}[attr1].
- Added declaration substitution, which outputs the contents of a CSS block declaration, using the format
- Changes
- Refactored code to avoid possible clashes with other scripts.
0.6.2
2020-08-15
- Additions
- Added parser constant
DECIMAL_PLACESfor controlling how many decimal places numbers are outputted with. - Added built-in function
@lowercaseto change a string to lowercase. - Added built-in function
@uppercaseto change a string to uppercase. - Added built-in function
@titlecaseto capitalize the first letter of each word in a string. - Added built-in function
@camelcaseto capitalize the first letter of each word in a string except for the first one. - Added built-in function
@capitalize/@capitaliseto capitalize the first letter of a string.
- Added parser constant
- Changes
- Changed
@vardeclarations to allow the variable content to be modified later in the document. - Changed
@constdeclarations to make the parser constant name case insensitive. - Changed parsing order to resolve previous element selectors before they are used in built-in functions.
- Changed built-in function
@eachto remove the need to explicitly declare the splitting and joining delimiters. The joiner now defaults to the splitter, which in turn defaults to a comma (,). New syntax:$( @each | <items> [| <splitter = ","> [| <joiner = splitter>]] | <content> ). - Changed built-in function
@extractto remove the need to explicitly declare the delimiter. New syntax:$( @extract | <list> [| <delimiter = ",">] | <index> ).
- Changed
- Fixes
- Fixed previous element selectors being too greedy in what they copy.
- Fixed built-in function
@eachtreating an empty string and a space as the same character in its delimiter arguments. - Fixed built-in function
@replaceignoring whitespace in its finder and replacer arguments.
0.6.1
2020-07-29
- Changes
- Changed the syntax of built-in function
@breakpointto allow declaration blocks in its second and third arguments and to suppress the output of the "min-width" segment if its respective argument is not set.
- Changed the syntax of built-in function
- Fixes
- Fixed erroneous console errors occurring in Node.
- Fixed empty arguments nullifying the following ones.
- Fixed built-in function
@grayscaleoutputting an HSLA color when passed an HSL color. - Fixed built-in function
@contrastoutputting "undefined" when missing its arguments.
0.6.0
2020-07-26
- New features
- Added command-line support using
node novasheets <args>(or, after installing usingnpm install -g novasheets:novasheets <args>).- Arguments:
[--compile] <input file> <output file>to compile a NovaSheets file into CSS;--parseto parse raw NovaSheets content and log the output CSS to the console;--helpto display help; and--versionto display the current version.
- Arguments:
- Added previous element selectors, used to copy the contents of the previous CSS selector.
- Ampersands (
&) take the previous raw selector (i.e., the last selector that does not contain an ampersand), while percent signs (%) take the previous selector. - Add less-than signs (
<) to slice the last item off the selector (for example, if&<becomesdiv+pre<, the output isdiv); characters treated as delimiters are>,+,~, and whitespace.
- Ampersands (
- Added a warning for when HSL values are passed into the luma function as it only works for RGB values.
- Added command-line support using
- New functions
- Added built-in function
@breakpointto make media queries easier. Syntax:$(@breakpoint | <pixels>[px] | <selector> | <smaller> | <larger> ). - Added built-in function
@prefixto add all vendor prefixes to a CSS property. Syntax:$(@prefix | <property> | <value> ). - Added built-in function
@spinwhich cycles the hue of a color. Syntax:$(@spin | <color> | <amount> ). - Added built-in function
@blendwhich blends two colors together. Syntax:$(@blend | <color1> | <color2> | [<amount>] ). - Added built-in function
@shadewhich blends a color with black. Syntax:$(@shade | <color> | [<amount>] ). - Added built-in function
@tintwhich blends a color with white. Syntax:$(@tint | <color> | [<amount>] ). - Added built-in function
@tonewhich blends a color with gray. Syntax:$(@tone | <color> | [<amount>] ). - Added built-in function
@contrastwhich controls a value dependent on the contrast of a color. Syntax:$(@contrast | <color> | <light> | <dark> ). - Added built-in function
@grayscale(alias@greyscale) which removes the hue of a color. Syntax:$(@grayscale| <color> ).
- Added built-in function
- Changes
- Changed built-in function
@colorto coerce single- and double-character hash values and allow uppercase type values. - Changed length math to always output the cleanest unit.
- Changed console warnings.
- Changed built-in function
- Fixes
- Fixed built-in function
@ifoutputtingundefinedwhen missing its second argument. - Fixed built-in color functions not outputting alpha values as percents.
- Fixed length units not being converted properly.
- Fixed more floating-point artifacts not being fully removed.
- Fixed built-in function
0.5.2
2020-07-14
- Fixed order of operations not being applied properly.
- Fixed double negatives sometimes not being treated as addition.
- Fixed spaced math operations inside brackets not being parsed properly.
- Fixed some floating-point artifacts not being fully removed.
- Refactored internal code to simplify math parsing and improve performance of math operations.
0.5.1
2020-07-09
- Added console warnings for when the parser detects a recursive variable.
- Changed built-in function
@eachto add an output delimiter parameter. New syntax:$(@each | <list> | <list delimiter> | <output delimiter> | <content> ). - Changed built-in function
@repeatto allow using pipes and using$ito refer to the current index in its content. - Changed in-built math functions to type check its input to prevent invalid math operations.
- Changed CSS output to keep the same indentation and newline formatting as the input.
- Fixed missing
@endvardeclarations causing infinite recursion. - Fixed built-in function
@eachnot allowing nested variables containing instances of$i,$v, etc. - Fixed built-in function
@clampnot clamping properly to its maximum value. - Fixed built-in function
@replacenot parsing regular expressions properly. - Fixed math operations inside built-in functions not being parsed before the function is applied.
- Fixed default argument substitutions requiring the pipe to be prefixed with a space.
- Fixed arguments being skipped if they are placed after an empty anonymous argument.
- Fixed unary negative operators being treated as subtraction.
- Fixed floating-point artifacts not being removed.
- Fixed slashes inside of CSS color functions being treated as division signs.
- Fixed URLs being treated as comments.
- Fixed inaccessible stylesheets having their 404 pages returned as stylesheet contents.
- Refactored internal code to check for math operations only when necessary, improving performance by up to 95%.
0.5.0
2020-07-04
- Added different categories of block comments, each with a different purpose:
- Regular comments (
/*content*/): output the raw content inside of them as a CSS comment; i.e, itself. - Static comments (
/*/content/*/): output the raw content inside of them as raw CSS or NovaSheets syntax; i.e., itself but without the "/*/"s. - Parsed comments (
/*[content]*/): output the parsed content inside of them as a CSS comment.
- Regular comments (
- Added support for default argument content, declared by adding a pipe (
|) followed by the default content into the argument substitutor (e.g.,$[text|default]). - Added built-in function
@extractfor extracting the nth item from a delimited string. Syntax:$(@extract | <list> | <delimiter> | <index> ). - Added built-in function
@eachfor applying an operation to each item in a delimited string, referring to the index with$iand value with$v,$v[1],$v[$i+1], etc. Syntax:$(@each | <list> | <delimiter> | <replacement> ). - Added built-in function
@lumafor calculating the relative luminance (between 0 and 1) of a color. Syntax:$(@luma | <color> ). - Added
colourandcolourpartas aliases of built-in functions@colorandcolorpartrespectively. - Added console warnings for when variables are not parsed.
- Removed the need to explicitly initialize variables in variable declarations.
- Fixed built-in function
@colornot working when passed a CSS color function with a hash color output. - Fixed built-in function
@replacenot allowing full regular expression syntax such as grouping and boolean 'or'. - Fixed built-in functions
@degreesandgradianshaving incorrect conversions between each other. - Fixed built-in functions
@eandpinot being parsed when they have leading or trailing whitespace. - Fixed small decimal values being truncated incorrectly (e.g.,
0.000000001234turning into0234instead of just0). - Fixed equals signs in the contents of a single-line variable declaration (e.g.,
@var x = y = z) causing the content that follows to not show up in the output CSS. - Refactored internal parsing of variables to bracket-match completely, allowing for nested parentheses.
0.4.7
2020-06-27
- Added parser constant
MAX_MATH_RECURSIONfor controlling how many times to perform each part of the order of operations before continuing on to the next operator. - Added parser constant
KEEP_NANfor deciding whether or not to parse malformed numbers toNaN. - Changed built-in function
@colorto output a generic CSS level-4 color function when given atypeother thanrgb,rgba,hsl,hsla, orhash, and to allow inputting any value as a percentage (which can be either implicit, i.e. below 1, or explicit using%). - Changed parsing of units to once again allow having a space before the unit.
- Fixed the parser crashing when it comes across invalid unit math, regular expressions in built-in function
@replace, empty arguments in built-in function@color, or certain values in built-in functions@minandmax. - Fixed built-in functions incorrectly parsing negative numeric arguments.
- Fixed inline variable declarations including the content after the
@endvarkeyword. - Fixed single zero-padded numbers being truncated.
- Fixed spaced
+and-math operators not being parsed. - Fixed units with millimetres being incorrectly converted.
- Fixed hexadecimal values containing letters not being treated as numbers.
0.4.6
2020-06-25
- Changed parsing of numbers to always convert from base 2, 8, and 16 to base 10.
- Changed parsing of units to disallow having a space before the unit.
- Fixed built-in function
@replacenot replacing all instances of the specified string. - Fixed
echaracters in hexadecimal values being parsed as order-of-magnitude exponentation. - Fixed newlines and spaced units being truncated completely in the output CSS.
- Fixed pseudo-classes being malformed in the output CSS.
0.4.5
2020-06-23
- Changed built-in function
@colorto default missing hex values to0and allow more flexibility in its arguments. - Changed built-in function
@colorpartallowinghex/hexadecimalas aliases forhash. - Fixed built-in function
@bitwiseoutputting its name as well as its parsed content. - Fixed built-in function
@colornot allowing percentages and not parsing its arguments properly. - Fixed built-in function
@colorpartnot parsing parts properly, not allowingrgb/rgbaCSS functions when using typehash/#, and not outputting the raw hash value if passed with typehash/#. - Fixed built-in function
@roundoutputtingNaNwhen the "decimal places" argument is missing. - Fixed floating-point math outputting strings of zeroes or nines.
0.4.4
2020-06-21
- Changed variable declarations using the existing
=notation to be strictly single-line declarations. - Changed unit parsing to be more intuitive, allowing more units in any permutation (
1/2em,1em/2,1em/2em, etc). - Changed syntax of built-in function
@logto allow a base as its first argument. - Changed built-in function
@replaceto allow regular expressions. - Changed built-in functions
@degrees,@radians, and@gradiansto default to radians, degrees and degrees respectively. - Changed built-in function
@colorto allow colors being created from hash values. - Changed built-in function
@colorpartto allow more aliases for its first parameter, such asGREEN/grn/etc for "green", etc. - Fixed bracketed numbers not having math operations applied to them.
- Fixed boolean values outputting incorrect results when containing leading and/or trailing whitespace.
- Fixed built-in function
@ifoutputtingundefinedwhen falsey and the "if false" argument is missing. - Fixed conversions to radians in built-in functions
@degreesand@gradians. - Fixed built-in function
@ceilnot working. - Fixed leading and/or trailing whitespace affecting the output of built-in functions.
- Fixed built-in function
@colorpartbreaking when being passed a raw CSS color function.
0.4.3
2020-06-18
- Added support for scientific notation using
E/efor values below1e21. - Fixed declarators in the middle of a line not being parsed.
- Fixed anonymous arguments not adapting to the maximum argument parser constant.
- Fixed parsing of multiple order of operations.
0.4.2
2020-06-16
- Added support for anonymous variable arguments.
- Changed math parsing to allow a space between the last number and its unit to improve readability.
- Fixed inline comments breaking variable declarations.
- Fixed URLs in variable contents being treated as comments.
- Fixed order of operations not being properly applied.
0.4.1
2020-06-14
- Added built-in function
@degreesfor converting a value to degrees. - Changed syntax of built-in functions
@degrees,@radians, and@gradiansto mandate the keywordsdeg,rad, orgradin its first argument. - Fixed ampersands not working when using an HTML element as input.
- Fixed chained logical statements not being parsed correctly.
- Fixed bitwise
ornot working properly. - Fixed math inside the contents CSS
calcfunction being incorrectly parsed.
0.4.0
2020-06-13
- Added support for declaring variables anywhere in the document.
- Added support for placing variable content on the same line as the variable declaration by seperating the two with "
=". - Added the
@endvarkeyword for declaring the end of the contents of a variable. - Added built-in functions
@radians/@gradiansand@bitwise/@booleanfor converting from degrees and performing bitwise/logical operations, respectively. - Added support for operators
not/!/~,and/&&/&,or/||/|,nand,nor,xor, andxnorin the first argument of built-in funcionif. - Removed the
---separator keyword as it is superceded by@endvar. - Removed the
degandgradkeywords as they interfere with raw CSS. - Fixed unparsed or invalid variables and arguments appearing in the output CSS.
0.3.5
2020-06-11
- Changed output to put each CSS declaration on its own line.
- Fixed empty variables being truncated completely to an empty string instead of one space.
0.3.4
2020-06-09
- Added
degandgradkeywords which change the preceeding number to radians and gradians, respectively. - Added support for length conversions between
cm,mm,ft, andinto metres using math operators. - Added in-built function
percentfor converting a value to a percentage. - Changed the
sourcedata attribute of the output style element to use a relative link. - Removed support for using math operators on the right side of values with units.
- Fixed variables not being substituted when they contain trailing whitespace.
- Fixed
@constdeclarations that appear after@vardeclarations being part of that variables content.
0.3.3
2020-06-09
- Added support for using math operators on the right side of values with units.
- Fixed multiple calls of the same variable with different arguments outputting the same result each time.
- Fixed nested variables with arguments still sometimes not being parsed correctly.
- Fixed the parentheses in math operations not being removed when it contains leading or trailing whitespace.
0.3.2
2020-06-08
- Changed output style element to use the file path of the external stylesheet as the
sourcedata attribute. - Fixed nested variables with arguments sometimes not being parsed correctly.
0.3.1
2020-06-07
- Changed output element to include the source of the stylesheet in the element's dataset.
- Fixed external stylesheet imports not working in older browsers.
- Fixed bracketed numbers having their brackets removed.
- Fixed parsing of numbers with many prefixed plus or minus signs.
0.3.0
2020-06-06
- Added a plethora of built-in variables, all prefixed with
@.- Math functions and variables:
mod,min,max,clamp,sin,asin,cos,acos,tan,atan,abs,floor,ceil,round,log,root, andpi. - Logical functions:
if. - Text functions:
encode,replace, andlength. - Color functions:
colorandcolorpart.
- Math functions and variables:
- Added support for math conversions using exponents (
^or**), multiplication (*), division (/), addition (+), and subtraction (-); order of operations applies in that order.- Supports base 10 (no prefix), base 2 (prefix
0b), base 8 (prefix0o), and base 16 (prefix0x).
- Supports base 10 (no prefix), base 2 (prefix
- Added
@constdeclarator to modify parser constantsMAX_RECURSIONandMAX_ARGUMENTS. - Changed NovaSheets
typeandreldeclarations to be case insensitive and to allow the word "NovaSheet" being pluralised. - Changed NovaSheets
typedeclarations to apply to any element instead of applying only totemplateelements.
0.2.1
2020-05-31
- Changed output to prevent multiple duplicate stylesheets being outputted when running the parsing command multiple times.
- Fixed parameters sometimes not being fully parsed.
0.2.0
2020-05-31
- Added support for variable parameters.
0.1.2
2020-05-31
- Fixed tabs not being treated as spaces when parsing input.
- Fixed CRLF character breaking variable substitution.
- Fixed infinite recursion on variable substitution.
0.1.1
2020-05-29
- Added support for nesting variables inside other variables.
- Fixed inaccessible stylesheets crashing the parser.
0.1.0
2020-05-28
- Supports variable declaration in the front matter and substitution in the CSS content.
- Supports both internal and external stylesheets.
- Supports single-line comments.