Comments (11)
@Ei-aaie thanks for the heads up on this - there's not a lot of CSS in the project and SASS provide a nice migration tool by the looks of it so I'll push a fix up this weekend.
from contenttools.
@Ei-aaie thank you for the report and your work looking into the issue - I've pushed up a new release 1.6.15 which removes the reliance on the division operator I believe.
Multiplication would have been a good way to go on thinking about it but in the end I just when we declaring half sizes where convenient.
Let me know if you are still get any warnings in dart-scss now.
from contenttools.
Ahh that's an external library not part of ct - I'll see if I can remove ideally or upgrade if not.
from contenttools.
@Ei-aaie if you look at the latest release of bourbon they don't support Dart SASS yet and had to revert the fix for div (thoughtbot/bourbon#1106 (comment)). So for now I'm just going to patch the version I include in CT if I can as they form part of the repo within the external directory. If that doesn't work I'll remove the dependency (but looking at it that's a bigger job so would be another weekend away).
from contenttools.
@Ei-aaie ok can we try again, new release 1.6.16 - let me know.
from contenttools.
I forked the project, it looks like it runs a Ruby sass version, not Dart-sass
The result is that the migration does the job, but the build fails at :
sass:build
Error: Invalid CSS after "... $number: math": expected "}", was ".div($number, $..."
on line 45 of external/styles/bourbon/helpers/_str-to-num.scss
from line 25 of external/styles/bourbon/_bourbon.scss
from line 5 of src/styles/content-tools.scss
40: }
41:
42: @else {
43: // Move the decimal dot to the left
44: $divider: $divider * 10;
45: $number: math.div($number, $divider);
46: }
47:
48: $result: $result + $number;
49: }
50: }
sass:math
lib is dart-sass specific :)
There is a dart-sass grunt package, but I'm not very familiar with grunt / coffee synthax
https://www.npmjs.com/package/grunt-dart-sass
from contenttools.
So I think locally now we use libsass for comping the project, but there's probably still the old ruby sass requirements in the last release of CT. Will look into what's possible, it's likely some of if not all the divisions can be removed to be honest.
from contenttools.
After compiling locally, ~50% can be replaced by multiplication without changing any deps, for example :
- margin-top: -($dialogHeight / 2);
+ margin-left: -($dialogWidth * 0.5);
sass-migrator uses this kind of smart fix if t's possible, and if not, applies math.div
from contenttools.
@anthonyjb It's almost it ! There are only 2 warnings left :
/external/styles/bourbon/functions/_strip-units.scss 4:12
and
/external/styles/bourbon/functions/_px-to-em.scss 12:12
from contenttools.
Working like a charm ! Thank you !
from contenttools.
@Ei-aaie great thank you for the help with issue.
from contenttools.
Related Issues (20)
- Save issue - saves fine, but won't allow a second "save" HOT 5
- Making CT compatible with CSP style-src set to 'self'
- Can't edit files that were included or read by php HOT 17
- Edit multiple paragraphs at once. HOT 2
- Is there a way to change the default tag output for normal html tags HOT 2
- Missing translation in /src/scripts/ui/dialogs/table.coffee
- Problem update image classes HOT 5
- Build files to use dynamic import in pure javascript HOT 1
- How to use assign ? HOT 2
- Hot to keep style attributes on save.
- npm install failed HOT 2
- Feature: Support drag & drop of images
- The image uploader HOT 2
- Inspector bar doesn't show embedded HTML elements when wrapped with paragraph HOT 1
- Line breaks not saving
- Add class to a link
- Lazy loading of images
- Source code edit? Insert <script> tag HOT 3
- The part in italics is not the right one HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contenttools.