Issue #3326Opened March 9, 2021by devtechk2 reactions

canvas style css

Question

Code SnippetTEXT
Hi guys instead of styling in the init in this way...
it's possibile to use a scss file in canvas? canvas { style:['__FILE__.SCSS'] }
or simple make it cleaner with a single init css?

Thank you!


` myComponent.append(<style>
    body {
      background: rgb(204,204,204); 
    }
    .footer {
      position: absolute;
      bottom: 5mm;
      width: auto;
      left: 5mm;
      right: 5mm;
    }
    .footer-container {
      padding: 7px 88px 7px 96px;
    }
    .footer-text:nth-child(2) {
      float:right;
    }
    .footer-text {
      font-size: 11px;
    }
    .logo-noovle img{
      height: 41px;
      width: 211px;
    }
    .logo-placeholder img{
    float: right;
    height: 68px;
    width: 191px;
    }
    .page {
      background: white;
      display: block;
      margin: 0 auto;
      margin-bottom: 0.5cm;
      position: relative;
      padding: 5mm;
      overflow:hidden;
    }
    .page[size="A4"] {  
      width: 21cm;
      height: 29.7cm; 
    }
    @media print {
      body, .page {
        margin: 0;
        box-shadow: 0;
      }
    }
    .gjs-pn-buttons {
      display: none;
    }
    .gjs-logo{
      height:25px;
    }
    .gjs-cell {
      min-height: 75px;
      flex-grow: 1;
      flex-basis: 100%;
    }
    .gjs-row {
      display: flex;
      justify-content: flex-start;
      align-items: stretch;
      flex-wrap: nowrap;
      padding: 10px;
    }
 </style>);`

Answers (2)

artfMarch 21, 20212 reactions

You can use canvasCSS option if you don't want to use files.

devtechkMarch 21, 20210 reactions

Thank you very much! This config file is gonna help me a lot!

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.