Answers.Body: <p>Paste the following in the 'User stylesheet', click ok. Then go to 'Theming' and save the style with whatever name you like. The e-book will display nicely in any screen mode and there are a couple of neat little extras you won't see with other user themes. As with all CSS it can be further altered and tweaked to suit.</p>
  
  <pre><code>html {
      background: #e6e9e9;
      background-image: linear-gradient(270deg, rgb(230, 233, 233) 0%, rgb(216, 221, 221) 100%);
      -webkit-font-smoothing: antialiased;
  }
  
  body {
      background: #1f2326;
      box-shadow: 0 0 2px rgb(225, 225, 225);
      color: #d4d4d4;
      font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
      font-size: 16px;
      line-height: 1.5;
      margin: 0 auto;
      max-width: 800px;
      padding: 2em 2em 4em;
  }
  
  h1, h2, h3, h4, h5, h6 {
      color: #e4e7e7;
      font-weight: 600;
      line-height: 1.3;
  }
  
  h2 {
      margin-top: 1.3em;
  }
  
  a {
      color: #2196f3;
  }
  
  b, strong {
      font-weight: 600;
  }
  
  samp {
      display: none;
  }
  
  img {
      animation: colorize 2s cubic-bezier(0, 0, .78, .36) 1;
      background: transparent;
      border: 10px solid rgb(145, 143, 140);
      border-radius: 4px;
      display: block;
      margin: 1.3em auto;
      max-width: 95%;
  }
  
  @keyframes colorize {
      0% {
          -webkit-filter: grayscale(100%);
          filter: grayscale(100%);
      }
      100% {
          -webkit-filter: grayscale(0%);
          filter: grayscale(0%);
      }
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-15T09:31:29.427Z
Answers.Text: this repo has some good themes too. https://github.com/theKAKAN/CalibreCSS . I have also pushed your theme.
Answers.UserDisplayName: Awakened
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-29T06:18:44.017Z
Answers.LastActivityDate: 2018-10-04T20:56:12.380Z
Answers.LastEditDate: 2018-10-04T20:56:12.380Z
Answers.UserDisplayName: michael biller
Body: <p><strong>How do I apply styles to full screen mode only via the User Stylesheet?</strong><br>
  Specifically, I would like to adjust the <code>body</code> style during full screen mode to adjust <code>margin-left</code>.</p>
  
  <p>I would like to do this through the User Stylesheet so that changes are applied automatically and I don't have to edit them manually every time I open full screen view.</p>
  
  <p>Currently, I can edit the body tag, but this is applied whether in full screen mode or not.</p>
  
  <p>I feel like there should be some parent element for full screen view so a <a href="http://www.w3schools.com/cssref/sel_element_gt.asp" rel="noreferrer">selector</a> could be used such as <code>fullscreen &gt; body</code>.</p>
  
  <p>Ideas?</p>
  
  <p><strong>Update:</strong> It looks like the preferences for full screen options, which are limited to max width and max text height, <a href="https://github.com/kovidgoyal/calibre/blob/34b0afeca27acfb2f23ab88bdbe0955a5b45bb99/src/calibre/gui2/viewer/documentview.py#L344" rel="noreferrer">uses javascript</a> to manage the styling. </p>
  
  <p>Any ideas for injecting a parent element that wraps all CSS while <code>in_fullscreen_mode = True</code> in <code>documentview.py</code>? </p>
  
Tags: <ebook-readers><calibre><css>
Title: Calibre ebook viewer - Apply User Stylesheet to Full Screen Mode
UserDisplayName: iyrin
ThreadText: # Calibre ebook viewer - Apply User Stylesheet to Full Screen Mode
  
  (Asked by: username_0 on 2016-04-17)
  
  **How do I apply styles to full screen mode only via the User Stylesheet?**  
  Specifically, I would like to adjust the `body` style during full screen mode to adjust `margin-left`.
  
  I would like to do this through the User Stylesheet so that changes are applied automatically and I don't have to edit them manually every time I open full screen view.
  
  Currently, I can edit the body tag, but this is applied whether in full screen mode or not.
  
  I feel like there should be some parent element for full screen view so a [selector](http://www.w3schools.com/cssref/sel_element_gt.asp) could be used such as `fullscreen > body`.
  
  Ideas?
  
  **Update:** It looks like the preferences for full screen options, which are limited to max width and max text height, [uses javascript](https://github.com/kovidgoyal/calibre/blob/34b0afeca27acfb2f23ab88bdbe0955a5b45bb99/src/calibre/gui2/viewer/documentview.py#L344) to manage the styling.
  
  Any ideas for injecting a parent element that wraps all CSS while `in_fullscreen_mode = True` in `documentview.py`?
  
  **Tags:** ebook-readers, calibre, css
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-09-29. Score: 3 | Accepted answer
  
  Paste the following in the 'User stylesheet', click ok. Then go to 'Theming' and save the style with whatever name you like. The e-book will display nicely in any screen mode and there are a couple of neat little extras you won't see with other user themes. As with all CSS it can be further altered and tweaked to suit.
  
  ```
  html {
      background: #e6e9e9;
      background-image: linear-gradient(270deg, rgb(230, 233, 233) 0%, rgb(216, 221, 221) 100%);
      -webkit-font-smoothing: antialiased;
  }
  
  body {
      background: #1f2326;
      box-shadow: 0 0 2px rgb(225, 225, 225);
      color: #d4d4d4;
      font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
      font-size: 16px;
      line-height: 1.5;
      margin: 0 auto;
      max-width: 800px;
      padding: 2em 2em 4em;
  }
  
  h1, h2, h3, h4, h5, h6 {
      color: #e4e7e7;
      font-weight: 600;
      line-height: 1.3;
  }
  
  h2 {
      margin-top: 1.3em;
  }
  
  a {
      color: #2196f3;
  }
  
  b, strong {
      font-weight: 600;
  }
  
  samp {
      display: none;
  }
  
  img {
      animation: colorize 2s cubic-bezier(0, 0, .78, .36) 1;
      background: transparent;
      border: 10px solid rgb(145, 143, 140);
      border-radius: 4px;
      display: block;
      margin: 1.3em auto;
      max-width: 95%;
  }
  
  @keyframes colorize {
      0% {
          -webkit-filter: grayscale(100%);
          filter: grayscale(100%);
      }
      100% {
          -webkit-filter: grayscale(0%);
          filter: grayscale(0%);
      }
  }
  
  ```
  
  > **Comments:**
  > **username_2**: this repo has some good themes too. https://github.com/theKAKAN/CalibreCSS . I have also pushed your theme.  
  
  ---
  
  