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
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

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