Code Monkey home page Code Monkey logo

Comments (4)

johno avatar johno commented on August 14, 2024

Ah, sorry. That's a poorly concocted example on my behalf. More thorough stubs look something like (straight from the Furtive source which was generated by rework-flex-grid):

.grd {}

.grd-row {}

.grd-row-col-1-6 {}

.grd-row-col-2-6 {}

.grd-row-col-3-6 {}

.grd-row-col-4-6 {}

.grd-row-col-5-6 {}

.grd-row-col-6 {}

/* ... */

.grd-row-col-3-6--sm {}

/* ... */

I kept the example in the rework-flex-grid documentation a bit ambiguous because things like columns, class names, and media query breakpoints are all configurable. When I get a chance, I will update the documentation a bit to make things more clear.

I hope this sufficiently answers your question!

from furtive.

howardroark avatar howardroark commented on August 14, 2024

Totally! I think I am getting how this all joins together. I guess this is all so that you can render many grids to your CSS?

Is .grd-row-col-3-6--sm effectively equal to .grd-row-col-3-6?

Also I notice that furtive.co has no lg and md in the css... Is that something that has to be set?

from furtive.

johno avatar johno commented on August 14, 2024

Yeah, pretty much. I use the rework-flex-grid lib in numerous projects so I can generate a particular grid with the classes/columns/breakpoints that are appropriate for a project (allowing me to maintain the grid in one central location). Since my primary intention is to keep Furtive lightweight, a flex grid is the perfect fit. Using rework-flex-grid means I don't have to write the CSS. I'm lazy, 😸 . Instead, all I have to do is configure a task:

gulp.task('rework-grid', function() {
  return gulp.src('scss/_grid.scss')
    .pipe(replace(/\.*/, ''))
    .pipe(clean())
    .pipe(rework(
      grid({
        numColumns: 6,
        classNames: {
          grid: 'grd',
          row: 'row',
          col: 'col'
        }
      })
    ))
    .pipe(gulp.dest('scss'));
});

This way, when there are updates to the grid system, I just need to upgrade the npm package and rerun the task. Down the road, I also intend on shifting all of furtive to a rework system with single use modules, I've begun some of the work already: https://github.com/furtivecss.

The furtive.co CSS has been run through gulp-uncss so those classes won't exist in the built CSS for the site. However, if you look in the main distribution CSS file, you will see all the grid classes.

from furtive.

howardroark avatar howardroark commented on August 14, 2024

Got it! I was just using the furtive.co version when playing.

Thanks!
On Jan 9, 2015 1:19 PM, "John Otander" [email protected] wrote:

Yeah, pretty much. I use the rework-flex-grid lib in numerous projects so
I can generate a particular grid with the classes/columns/breakpoints that
are appropriate for a project (allowing me to maintain the grid in one
central location). Since my primary intention is to keep Furtive
lightweight, a flex grid is the perfect fit. Using rework-flex-grid means
I don't have to write the CSS. I'm lazy, [image: 😸] . Instead,
all I have to do is configure a task:

gulp.task('rework-grid', function() {
return gulp.src('scss/_grid.scss')
.pipe(replace(/.*/, ''))
.pipe(clean())
.pipe(rework(
grid({
numColumns: 6,
classNames: {
grid: 'grd',
row: 'row',
col: 'col'
}
})
))
.pipe(gulp.dest('scss'));
});

This way, when there are updates to the grid system, I just need to
upgrade the npm package and rerun the task. Down the road, I also intend on
shifting all of furtive to a rework system with single use modules, I've
begun some of the work already: https://github.com/furtivecss.

The furtive.co CSS has been run through gulp-uncss
https://github.com/ben-eb/gulp-uncss so those classes won't exist in
the built CSS for the site. However, if you look in the main distribution
CSS file
https://github.com/johnotander/furtive/blob/master/css/furtive.css, you
will see all the grid classes.


Reply to this email directly or view it on GitHub
https://github.com/johnotander/furtive/issues/39#issuecomment-69375020.

from furtive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.