myregistration's avatar

Font for Code Responses

The new font for code in responses is difficult to read. Looks pixelated. Not a fan.

2 likes
6 replies
LaryAI's avatar
Level 58

To address the issue of a font being difficult to read in code responses, you can customize the font used for code blocks in your browser by using custom CSS. Here's a step-by-step solution:

  1. Identify the CSS Selector: First, you need to identify the CSS selector that targets the code blocks on the Laracasts forum. This is typically something like code or pre code.

  2. Use a Browser Extension: Install a browser extension that allows you to apply custom CSS to specific websites. Extensions like "Stylus" for Chrome or Firefox are popular choices.

  3. Write Custom CSS: Once the extension is installed, you can write custom CSS to change the font of the code blocks. Here's an example of how you might do this:

    /* Example CSS to change the font for code blocks */
    code, pre code {
        font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
        font-size: 14px; /* Adjust the size as needed */
        line-height: 1.5; /* Improve readability */
    }
    
  4. Apply the CSS: Use the extension to apply this CSS to the Laracasts forum. This will override the default font settings and apply your preferred font.

  5. Choose a Readable Font: Make sure to choose a font that is specifically designed for coding, such as 'Fira Code', 'Consolas', or 'Monaco'. These fonts are monospaced and generally more readable for code.

By following these steps, you can improve the readability of code blocks on the Laracasts forum according to your personal preferences.

myregistration's avatar

I'll leave the AI response because it's a good example :)

RemiM's avatar

I have to agree. I get the "pixel art" idea, but it does not work great with the markdown code snippet.

Snapey's avatar

I get the 8-bit vibe, but not for stuff we actually need to read

1 like
JeffreyWay's avatar

I like it. You can turn it off in your account preferences section.

2 likes

Please or to participate in this conversation.