Skip to content

feat(codeforces): init#2001

Open
ChakornK wants to merge 38 commits intocatppuccin:mainfrom
ChakornK:feat/codeforces
Open

feat(codeforces): init#2001
ChakornK wants to merge 38 commits intocatppuccin:mainfrom
ChakornK:feat/codeforces

Conversation

@ChakornK
Copy link
Copy Markdown

@ChakornK ChakornK commented Nov 23, 2025

🎉 Theme for Codeforces 🎉

Codeforces is a website that hosts competitive programming contests.

🌻 Latte
🪴 Frappé
🌺 Macchiato
🌿 Mocha

🗒 Checklist 🗒

  • I have read and followed Catppuccin's submission guidelines.
  • I have made a new directory underneath /styles/<name-of-website> containing the contents of the /template directory.
    • I have ensured that the new directory is in lower-kebab-case.
    • I have followed the template and kept the preprocessor as LESS.
  • I have made sure to update the userstyles.yml file with information about the new userstyle.
  • I have included the following files:
    • catppuccin.user.less - all the CSS for the userstyle, based on the template.

@ChakornK ChakornK requested a review from uncenter as a code owner November 23, 2025 09:14
@WalkQuackBack WalkQuackBack added the 0.kind: init A new userstyle label Nov 27, 2025
@uncenter uncenter added the 5.needs: staff-review A review by a staff member is required/needed label Nov 27, 2025
@WalkQuackBack WalkQuackBack added 2.status: pending Pending until internal discussion, planned updates, etc. 4.topic: tints/shades Relating to the tints and shades palette labels Nov 30, 2025
@WalkQuackBack
Copy link
Copy Markdown
Member

Marking this as pending, since tints and shades are not yet adopted and fading, lightening and darkening colours isn't standardized. Thanks for taking the time to work on this.

@ChakornK
Copy link
Copy Markdown
Author

fading, lightening and darkening colours isn't standardized

I have removed the use of lightening and darkening as they are not necessary. However, fading cannot be removed as it is used to theme elements on the website that already have faded colors.

@WalkQuackBack
Copy link
Copy Markdown
Member

Due to fading amounts not being standardized, things like the 20% fade on https://github.com/catppuccin/userstyles/pull/2001/files#diff-97f27cb299e39122d175d160679ab75e205eda13a7c341004633efb681432260R61 may be inconsistent with other userstyles. I think we’re holding off on userstyles that do that for now, so we can standardize it first then use it, instead of later down the line going back and migrating everything.

Comment thread scripts/userstyles.yml Outdated
Comment thread styles/codeforces/catppuccin.user.less Outdated
Comment thread styles/codeforces/catppuccin.user.less Outdated
Comment thread styles/codeforces/catppuccin.user.less Outdated
Comment on lines +414 to +435
* when not(@flavor = latte) {
img[src*="codeforces-sponsored-by-ton"] {
filter: invert(1) sepia(1) hue-rotate(hue(@accent) - 39deg) saturate(2);
}

img[src*="votedown-"],
img[src*="voteup-"] {
opacity: 1 !important;
}

img[src*="tablesorter-"] {
filter: invert(1);
}

img[src*="icons/user"] {
filter: brightness(1.6) contrast(0.8);
}

img.tex-formula {
filter: invert(1);
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use our official filters palette instead of customs/inversions: https://userstyles.catppuccin.com/contributing/guides/images-and-svgs/#monochrome-img-elements.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official filter does not work well when the image is non-transparent. It turns the logo into one single color, as shown below:
{0501A852-4734-43BE-9EA6-5FDB58F17F75}

The filter that I currently have for reference:
{5A6E5025-DA9F-4EF9-BB3A-F6B085FC98C1}

Original logo
{BC72619E-C1BD-426C-AF53-392B3BE9997E}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the rest of the icons besides the logo?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These have been removed

img[src*="votedown-"],
img[src*="voteup-"] {
  opacity: 1 !important;
}
img[src*="icons/user"] {
  filter: brightness(1.6) contrast(0.8);
}

Other rules have been removed.


[id^="vote-list-filterDifficulty"] {
  filter: invert(1) hue-rotate(180deg) brightness(2);
  mix-blend-mode: exclusion;
}

is needed to style the ratings: https://codeforces.com/gyms
The star images are not transparent so it is not possible to style them using built-in filters.
{90645EE4-074C-4ED0-836A-B900AF8B8F71}
{F401EF91-C3AB-4291-BE7A-DE6FA17C0009}

Comment thread styles/codeforces/catppuccin.user.less Outdated
@ChakornK ChakornK requested a review from uncenter December 22, 2025 18:41
@uncenter uncenter removed 2.status: pending Pending until internal discussion, planned updates, etc. 4.topic: tints/shades Relating to the tints and shades palette labels Dec 27, 2025
@uncenter
Copy link
Copy Markdown
Member

Unthemed footer divider bar:

CleanShot 2025-12-27 at 19 41 13@2x

Online now green text unthemed:

CleanShot 2025-12-27 at 19 41 20@2x

This gray text around the calendar is unthemed:
CleanShot 2025-12-27 at 19 41 26@2x

Comment thread scripts/userstyles.yml Outdated
Comment thread styles/codeforces/catppuccin.user.less
a[name] {
color: @blue !important;
&:hover {
color: @blue !important;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
color: @blue !important;
color: @sky !important;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original styling does not change the link's color on hover. a[name] matches colored titles on a blog page, but the title is not always clickable.
Example: https://codeforces.com/blog/entry/149513

"Good Bye 2025" is a clickable link but its color does not change when hovered.
Image

"Comments (189)" is matched using a[name] but it is not a clickable link. So it would not make sense for there to be visual feedback when hovering over it.
Image

Should I change the styling to always be sky instead of blue?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we tell clickable links from non-clickable links? Blue to sky on hover for clickable, and then text for non-clickable? I think its confusing that links and non-links are styled the same way.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made a small mistake. a[name] is used to make text blue. But none of the elements are actually clickable links. "Good Bye 2025" is not styled with a[name].

Some occurrences of a[name] have a different background color when hovered like this:
{084DF118-FBF2-4EAB-80D3-9236F9BBAEA1}
{39FDDFDE-C32B-4FED-AA15-A291D2931367}

This is similar to the user name links. For the sake of consistency, should I remove the background color for these as well?

Because the original styling shows visual feedback when hovering over the text, I will also make the text change from blue to sky when hovered.

Comment thread styles/codeforces/catppuccin.user.less
Comment thread styles/codeforces/catppuccin.user.less Outdated
Comment thread styles/codeforces/catppuccin.user.less Outdated
}
}

// https://github.com/bajrangCoder/acode-catppuccin
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should think about library-ing this because this port isn't actually official.

@imsuck
Copy link
Copy Markdown

imsuck commented Jan 18, 2026

Currently the legend box of the rating graph looks like this:
image

One can probably style it like so:

.legendColorBox > div[style*="#ccc"] {
    border: 2px solid #363a4f !important;
    padding: 0 !important;
}
/* is there a nicer way to do this? */
.legendColorBox div[style*="rgb(237,194,64)"] {
    border: 6px solid #ed8796 !important;
}
.legendLabel {
    color: #cad3f5;
    background-color: #363a4f;
}
image

I apologize for my abysmal knowledge in CSS. (-‿-")

@ChakornK
Copy link
Copy Markdown
Author

Currently the legend box of the rating graph looks like this: image

One can probably style it like so:

.legendColorBox > div[style*="#ccc"] {
    border: 2px solid #363a4f !important;
    padding: 0 !important;
}
/* is there a nicer way to do this? */
.legendColorBox div[style*="rgb(237,194,64)"] {
    border: 6px solid #ed8796 !important;
}
.legendLabel {
    color: #cad3f5;
    background-color: #363a4f;
}
image

I apologize for my abysmal knowledge in CSS. (-‿-")

Thanks, I've made some changes to your code and added it in 956fb32

@imsuck
Copy link
Copy Markdown

imsuck commented Jan 19, 2026

Comments can be highlighted when you go from notifications to a comment, i.e:
From here
image
To here
image
The CSS class responsible for this is

.highlight {
    border: 1px solid #FFC300;
    background-color: #FFF7DB !important;
}

@ChakornK
Copy link
Copy Markdown
Author

Comments can be highlighted when you go from notifications to a comment, i.e: From here image To here image The CSS class responsible for this is

.highlight {
    border: 1px solid #FFC300;
    background-color: #FFF7DB !important;
}

4886580

@imsuck
Copy link
Copy Markdown

imsuck commented Feb 22, 2026

I have some more suggestions:

  • When you get a rating surge, this notification will appear:
    image
    The element itself has no class, only a style attribute, so you'll have to work with it.
    <div style="background-color: #EAF4FF; padding: 1px 3px; font-size: 1.1rem; margin-top: 3px">
      <img alt="" src="//codeforces.com/codeforces.org/s/95569/images/icons/mail-16x16.png" style="">
      <span style="position: relative; bottom: 3px;">
        You have
        <b><a href="/bestRatingChanges/10916917">+313! Wow!</a></b>
      </span>
    </div>
  • This is my CSS from a while for the code display section, which currently looks... undesirable:
    • Dedicated submission page
      image
    • Code pop-up modal
      image

@uncenter
Copy link
Copy Markdown
Member

uncenter commented Mar 2, 2026

Is there a (public) page I can see that syntax highlighting on for, or do I need to have submitted code for a problem on my end?

@imsuck
Copy link
Copy Markdown

imsuck commented Mar 2, 2026

Seems like Codeforces has disabled viewing source code of others if you haven't solved a problem D:

@ChakornK
Copy link
Copy Markdown
Author

ChakornK commented Mar 26, 2026

Rating surge notification is styled now.
I will not fix the code pop-up modal (or any code syntax highlighting) for now (see here).

@ChakornK
Copy link
Copy Markdown
Author

I have some more suggestions:
* Dedicated submission page
image
* Code pop-up modal
image

Fixed.

Dedicated submission page Code pop-up modal
image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: init A new userstyle 5.needs: staff-review A review by a staff member is required/needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants