Support » Plugin: TablePress » Anyway to write CSS in .css file?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Directly writing into the CSS files that TablePress uses (tablepress-custom.css, tablepress-combined.css, and tablepress-combined.min.css in wp-content) is not possible unfortunately, as that breaks the saving/minification process.
    CSS changes should therefore always be done through the “Custom CSS” textarea.

    My suggestion is that you keep your own copy of your SASS file and a compiled CSS file offline on your computer (or also in wp-content), and then copy/paste the CSS file’s contents into the “Custom CSS” field after a change.
    Alternatively, you could use the available plugin filter hooks (in the function get_custom_css_location() in classes/class-css.php) and make those point to your compiled CSS file.

    (As a sidenote: I do have SASS/SCSS support on my “Ideas” list, so that this will maybe be possibile directly in TablePress in the future. That doesn’t help you right now, of course. Sorry.)

    Regards,
    Tobias

    Thanks for the detailed response. Great plugin, btw.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 I hope it helps!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Done! Thanks again.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks, I really appreciate it!

    Regards,
    Tobias

    @navyspitfire It’s more efficient to keep all your CSS in one file via your Sass workflow, then dequeue the TablePress CSS.

    add_action('wp_enqueue_scripts', 'dequeue_tablepress_style', 11 );
    function dequeue_tablepress_style(){
    	wp_dequeue_style('tablepress-default' );
    }

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    a different method would also be to just use

    add_filter( 'tablepress_use_default_css', '__return_false' );

    to turn off the Default CSS. With that, “Custom CSS” could still be used, if desired.

    Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Anyway to write CSS in .css file?’ is closed to new replies.