HTML/CSS How to achieve a paper effect in CSS for Joplin?

  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    Css Paper
AI Thread Summary
The discussion centers on creating a specific visual effect in Joplin using CSS, particularly for a userstyle.css file. The user seeks assistance in achieving a paper-like aesthetic similar to examples found on a design website. They have attempted to write their own CSS but encountered issues with functionality. The provided CSS code focuses on print styling, ensuring that notes are primarily in black and white for better readability when printed or exported to PDF. Key features include a light background color, a defined width for the notes, specific font choices, and various styling for tables, links, blockquotes, and code elements to ensure clarity and consistency in print format. The user also references a Stack Overflow discussion for additional context on achieving a paper background texture with CSS.
shivajikobardan
Messages
637
Reaction score
54
f18e83ad96b2f3700f1e69c8fc2a58497613dfa6.jpg

I want to achieve this effect in Joplin.

I need some CSS for it in userstyle.css.

I've few examples here:

https://freefrontend.com/css-paper-effects/

So, I am wondering if anyone could write a userstyle.css for me. I've gave a try but it's not working.

CSS:
 /* The below controls how a note displays when printed or exported to pdf. The intention is to make prints primarily black and white. */
    
    
    
     @media print {
         body {
    background-color: #eee;
      position: relative;
      z-index: 0;
      box-sizing: border-box;
      width: 500px;
      margin: 30px auto;
      
      font-family: 'Tangerine', cursive;
      font-size: 26px;
      
      border: 10px solid #fff;
      border-radius: 10px;
      box-shadow: 0 0 10px rgba(0,0,0,0.5);
      /* Background lines */
      background-image: linear-gradient(#f5f5f0 1.1rem, #ccc 1.2rem);
      background-size: 100% 1.2rem;
      
      line-height: 1.2rem;
      padding: 1.4rem 0.5rem 0.3rem 3.5rem;
    }
            table th, table td {
             color: #000000;
             border: 1px solid #000000;
            /* black table borders for printing */
             background: #ffffff;
            /* white table background for printing */
        }
         a {
             color: #000000;
             text-decoration: none;
            /* modify hyperlink text */
        }
         .resource-icon {
             background-color: #000000;
            /* makes any linked resource icons black */
        }
         blockquote {
             border-left: 4px solid #000000;
             /* makes the bar at the left of a blockquote black */
             opacity: 1;
             /* makes the blockquote text black */
        }
         code {
             color: #000000;
             font-weight: bold;
            /* bold code text for printing */
        }
         .inline-code {
             color: #000000;
             border: 0px none;
             background: none;
             font-weight: bold;
            /* bold code text for printing and removes the grey background and border*/
        }
         pre.hljs {
             border: 0px none;
             background: #F0F0F0;
             /* removes the border from fenced code blocks and modifies the grey background colour */
       }
         span[class^='hljs-'] {
             color: #000000 !important;
            /* modifies code highlighting colour for printing (all black!!) */
       }
         hr {
             border-bottom: 1px solid #000000;
            /* change horizontal rules to black for printing */
        }
         h1 {
             border: none;
             border-bottom: 1px solid #000000;
            /* change horizontal lines under h1 tags to black for printing */
        }
         mark {
             background-color: #F0F0F0;
            /* sets highlighter ==mark== to grey for printing */
        }
    }

Note that part of code was written to print codes in black and white I just edited the body part here.
 
Technology news on Phys.org
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Replies
10
Views
2K
Replies
5
Views
2K
Replies
5
Views
2K
Replies
3
Views
2K
Replies
3
Views
3K
Replies
9
Views
4K
Replies
9
Views
4K
Replies
4
Views
3K
Replies
2
Views
5K
Back
Top