Menu

CSSBox and Bootstrap (satisfying media queries)

2014-06-25
2014-07-04
  • Dave Nebinger

    Dave Nebinger - 2014-06-25

    Okay, so I have a page using bootstrap. When using CSSBox to inline the styles to send as an html email, 'screen' just doesn't cut it because I cannot specify the screen dims so the html renders properly, so it results in treating the page as though it's really thin (i.e. a mobile view).

    How can I specify to CSSBox how to respond to media queries, specifically how to handle a device width?

     
  • Radek Burget

    Radek Burget - 2014-06-26

    Media queries is now a work in progress. A first preview is planned for the next release that is planned in about 2 weeks.

     
  • Dave Nebinger

    Dave Nebinger - 2014-06-26

    Any way to get early access to this? I need media query support like yesterday ;-)

     
  • Radek Burget

    Radek Burget - 2014-06-27

    First, media query support must be added to jStyleParser. Then, extending CSSBox should be quite easy. You may watch the process on GitHub but at the moment, there is nothing interesting yet.

     
  • Radek Burget

    Radek Burget - 2014-07-04

    Ok, first version is available on GitHub. You need to update both jStyleParser and CSSBox to the latest master version. There is a new MediaSpec class for specifying the current media features and DOMAnalyzer.setMediaSpec() to tell the analyzer about it. The BoxBrowser demo is updated to show the basic usage:
    https://github.com/radkovo/CSSBox/commit/b2e227426d037222057b6836d9279a08dc118116#diff-38d5ef214744d44ec58aa1598b6d7bad

    Any comments are welcome.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.