Giter Site home page Giter Site logo

Comments (4)

nknapp avatar nknapp commented on June 2, 2024

This ist due to https://github.com/bootprint/customize-engine-less/blob/master/index.js#L28 which converts the entries like { main: 'main.less' } into the internal representation { main: [ 'main.less' ] } and arrays are always merged by concatenation in customize.

At the moment, it is not possible to override files.

The thought behind this that you can always override declarations in less-files by appending a new less-file. I have not taken into account that reducing the size of the resulting css-file would be of concern.

I agree, this should be done. It should be an issue at customize-engine-less, but I am not sure how to fix it, and I personally probably won't have the time at the moment. If you want to propose a change, don't hesitate to create a PR. I will then have a look at it.

from bootprint.

mtraynham avatar mtraynham commented on June 2, 2024

I have a pretty crappy workaround, which is to alter the node_modules bootstrap.less file before running bootprint. So I'm not going to attempt a PR.

My problem does extend beyond reducing the size of the css.

I use this for static webpage generation, which works great, but when converting the page to PDF (using node-html-pdf or PhantomJS). it sets the @media to print. node-html-pdf uses PhantomJS and ultimately both libraries use QtWebKit, and they run into this bug. Bootstrap has it's own print styles, that use !important flags to wash out the colors of the webpage, which completely jacks the color scheme. I was hoping I could replace the bootstrap.less file with my own that removes the @import "print.less" through the configuration.

Customize.js has that _customize_custom_overrider, which looked promising, but I could never get it to work.

from bootprint.

nknapp avatar nknapp commented on June 2, 2024

I have changed the title to reflect your actual goal on this, so that other people can find it as well.

At the moment, I don't see a good alternative for the hacky workaround. Which is sad, because the whole idea of customize was to allow easy customizations, so this should be possible somehow.
I will have to think about it.

from bootprint.

nknapp avatar nknapp commented on June 2, 2024

You might be able to override the css style similar to the example in http://stackoverflow.com/questions/9636132/list-style-css-override-back-to-default (using inherit along with !important). Since your styles are included after the bootstrap-styles, they should override them if they are equal specific.

from bootprint.

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.