252 Commits

Author SHA1 Message Date
ConnorSkees
4b529a1236 proper error messages in (mixin|function)-exists 2020-03-23 15:22:16 -04:00
ConnorSkees
e6f2c26bc6 type-of(!important) returns 'string' 2020-03-23 15:13:19 -04:00
ConnorSkees
68d2bc7e17 global variables feature-exists 2020-03-23 15:06:04 -04:00
ConnorSkees
785c824cd8 check global scope for functions as well 2020-03-23 14:46:15 -04:00
ConnorSkees
d0b56c57d2 handle quoted strings in variable-exists 2020-03-23 14:34:03 -04:00
ConnorSkees
991b87f335 str-slice start/end equality does not preclude output 2020-03-23 14:16:27 -04:00
ConnorSkees
f4f9a79b2b handle large integers in builtin string functions 2020-03-23 14:03:47 -04:00
ConnorSkees
01c1cf3bb3 prefer the word lightness over luminance 2020-03-23 12:52:23 -04:00
ConnorSkees
6460c97ef4 better error messages for zero arg hsl(a) 2020-03-22 23:41:02 -04:00
ConnorSkees
6aae433d21 better error message for missing rgb/rgba args 2020-03-22 23:28:19 -04:00
ConnorSkees
d19c112765 str-len is a count of characters, not bytes 2020-03-22 18:24:09 -04:00
ConnorSkees
c392c33ad8 properly insert into empty strings 2020-03-22 18:13:55 -04:00
ConnorSkees
92809b1d03 Allow attributes in test macros 2020-03-22 18:13:23 -04:00
ConnorSkees
585786318f handle double wide characters in str-insert 2020-03-22 17:49:21 -04:00
ConnorSkees
9965fe99fe handle negative numbers more accurately in str-insert 2020-03-22 17:13:38 -04:00
ConnorSkees
047fd1d3de handle str-insert edge cases 2020-03-22 16:49:41 -04:00
ConnorSkees
9bf2b9d16c implement builtin function str-insert 2020-03-22 16:14:45 -04:00
ConnorSkees
c0ed933850 implement builtin function str-index 2020-03-22 15:58:32 -04:00
ConnorSkees
415b19fc47 implement @content inside mixins 2020-03-22 15:08:13 -04:00
ConnorSkees
29011f88bb Implement builtin function join 2020-03-22 14:04:16 -04:00
ConnorSkees
f9730b9ec5 HACK: somewhat handle unicode escapes 2020-03-22 13:45:41 -04:00
ConnorSkees
2f0fbd2415 @if/@else tests 2020-03-22 02:18:15 -04:00
ConnorSkees
78d7d5ce36 proper error message for out of place @return 2020-03-22 00:47:21 -04:00
ConnorSkees
c5f3936eb2 refactor lexing of at-rules 2020-03-21 23:57:36 -04:00
ConnorSkees
5914a07d22 handle backticks and control characters 2020-03-21 17:29:12 -04:00
ConnorSkees
502da79d42 test errors 2020-03-21 14:39:16 -04:00
ConnorSkees
7d12bc8142 implement unary ops + and - 2020-03-21 12:14:02 -04:00
ConnorSkees
e746bc7bda Allow utf-8 characters in idents 2020-03-20 23:53:26 -04:00
ConnorSkees
87462490ac Handle empty lists () 2020-03-20 20:01:57 -04:00
ConnorSkees
b0aff089aa implement builtin function append() 2020-03-20 19:50:23 -04:00
ConnorSkees
4fdac4c5f1 implement builtin function set-nth() 2020-03-20 19:27:26 -04:00
ConnorSkees
5ce2515fb6 handle non-list to nth() 2020-03-20 12:36:31 -04:00
ConnorSkees
284bc8ea6d Implement builtin function list-separator() 2020-03-20 12:32:33 -04:00
ConnorSkees
dd1c1e5b06 implement builtin function nth 2020-03-20 12:09:08 -04:00
ConnorSkees
fb84361fae parse comma separated lists (somewhat) properly 2020-03-20 10:59:16 -04:00
ConnorSkees
2db2ab10ca feature-exists units-level-3 2020-03-19 23:53:29 -04:00
ConnorSkees
20f702b40b Implement 1 arg for hsl and hsla 2020-03-19 23:44:53 -04:00
ConnorSkees
8a811dae9e Properly parse spaced lists 2020-03-19 21:40:36 -04:00
ConnorSkees
3919e92dcb Allow function declarations inside rulesets 2020-03-19 20:01:13 -04:00
ConnorSkees
0ad5e554b3 Add and subtract lists 2020-03-19 14:20:16 -04:00
ConnorSkees
d470074611 Improve chaining ops 2020-03-19 08:36:11 -04:00
ConnorSkees
103781e420 ident equality ignores quotekind 2020-03-18 17:23:38 -04:00
ConnorSkees
9630343676 Implement modulo 2020-03-18 11:39:58 -04:00
ConnorSkees
0fe97993f4 Properly handle trailing zeroes
This fixes an edge case in which there were trailing zeros that resulted
from the decimal having a non-zero part outside the precision range.

E.g. if precision were 10, `0.00000000000000000001` would be printed as `0.0000000000`.

This issue occured often when doing unit conversions between cm and in
(and similarly between dpcm and dpi).
2020-03-18 10:34:17 -04:00
ConnorSkees
efaa33088b Implement unit conversions in numeric subtraction 2020-03-18 10:14:35 -04:00
ConnorSkees
b3b5163113 Implement unit conversions in numeric addition 2020-03-18 10:08:40 -04:00
ConnorSkees
061694bd63 Initial implementation of !global (some issues remain) 2020-03-17 20:13:53 -04:00
ConnorSkees
d560f13289 Refactor how numbers are printed 2020-03-17 12:47:27 -04:00
ConnorSkees
1c4be96f73 Add tests for precision rounding 2020-03-17 10:28:04 -04:00
ConnorSkees
3b5dd73a65 Support arbitrary amount of numbers multiplied together 2020-03-17 10:06:24 -04:00