nathansmith / unsemantic

Fluid grid for mobile, tablet, and desktop.
http://unsemantic.com
MIT License
1.38k stars 161 forks source link

unsemantic sass does not run with leafo/scssphp #100

Closed Aybee closed 6 years ago

Aybee commented 6 years ago

Compilation of unsemantic sass files does not work with leafo/scssphp http://leafo.github.io/scssphp/

First it stops with messages of missing placeholder classes that should get extended.

name path last changed line# line
_unsemantic-vars.scss unsemantic-master\assets\sass\partials 18.01.2018 02:02 356 @extend %grid-container;
_unsemantic-vars.scss unsemantic-master\assets\sass\partials 18.01.2018 02:02 364 @extend %clear;
_unsemantic-vars.scss unsemantic-master\assets\sass\partials 18.01.2018 02:02 368 @extend %clearfix;
_unsemantic-vars.scss unsemantic-master\assets\sass\partials 18.01.2018 02:02 378 @extend %grid-parent;
_unsemantic-vars.scss unsemantic-master\assets\sass\partials 18.01.2018 02:02 384 @extend %grid-offset;
_unsemantic-vars.scss unsemantic-master\assets\sass\partials 18.01.2018 02:02 405 @extend %grid-columns-all;
_unsemantic-vars.scss unsemantic-master\assets\sass\partials 18.01.2018 02:02 414 @extend %grid-columns-all;

I added the missing placeholders in my _custom_vars.scss

%grid-container {
  content: '';
}
%clear {
  content: '';
}
%clearfix {
  content: '';
}
%grid-parent {
  content: '';
}
%grid-offset {
  content: '';
}
%grid-columns-all {
  content: '';
}

They must have at least one property.

Second: The output CSS is wrong. It creates mobile, tablet and desktop on all breakpoints. E.g.

...
@media (max-width: 400px) {
  ...
  .mobile-grid-5,
  .tablet-grid-5,
  .grid-5 {
    float: left;
    width: 5%
  }
  ...
nathansmith commented 6 years ago

Bummer. Sounds like a bug in SCSS PHP. Unsemantic compiles fine in Ruby Sass and LibSass.

You should submit an issue there…

https://github.com/leafo/scssphp/issues

Aybee commented 6 years ago

I think this is the most reliable php sass compiler at the moment. Search the net for php sass compiler. The project exists for about 6 years. Open tickets where closed quite recently. There are many projects that depend on leafo/scssphp http://mirror.vsibiri.info/libraries.io/packagist/leafo/scssphp/dependents.htm. I'm actually with the CMS Contao.

nathansmith commented 6 years ago

Cool, hopefully they'll get it working on par with LibSass and/or the Ruby Sass project eventually.