SMF icon indicating copy to clipboard operation
SMF copied to clipboard

[3.0] Theme

Open live627 opened this issue 1 year ago • 23 comments

This is the new theme started by @twitchismental

I still need to convert several form grids to use CSS grids instead of floats. Also the grids abuse definition list markup, something tat has always annoyed me from the very beginning.

Submitting as a draft now to get early feedback.

live627 avatar Dec 04 '23 16:12 live627

I notice that a few forms would disable textareas on submit, such as the posting form. I've changed this to do all forms by using the new HTML property to make the entire form inert.

live627 avatar Dec 28 '23 06:12 live627

Icons in the admin area are not indented enough: sshot-11

Unable to load the '' template at Forum Maintenance - Routine: sshot-12

SCEditor doesn't have a dark theme? sshot-13

Instead of "X Posts" and "Y Topics", maybe it would still be better to keep "Posts: X" and "Topics: Y" as it is now? sshot-14

dragomano avatar Dec 28 '23 14:12 dragomano

Icons in the admin area are not indented enough: sshot-11

I’m working on this

SCEditor doesn't have a dark theme? sshot-13

Can be fixed later too, but also requires some tweaks. Check this topic: https://www.simplemachines.org/community/index.php?topic=586626.0

Instead of "X Posts" and "Y Topics", maybe it would still be better to keep "Posts: X" and "Topics: Y" as it is now? sshot-14

I don’t have a preference, we might discuss it later for sure.

DiegoAndresCortes avatar Dec 28 '23 14:12 DiegoAndresCortes

@live627 Can you rebase this or merge and fix conflicts?

jdarwood007 avatar Jan 26 '24 05:01 jdarwood007

We have this pending https://github.com/live627/SMF2.1/pull/44

Will start sending more in upcoming weeks, but it could be merged, rest of changes are more focused so can be in separated PR's

DiegoAndresCortes avatar Jan 28 '24 17:01 DiegoAndresCortes

Once I can get around to testing and merging that, I'll rebase this branch again

live627 avatar Jan 30 '24 00:01 live627

@jdarwood007 I moved some of the login javascript to its own file but don't know how to test cors requests.

live627 avatar Feb 20 '24 12:02 live627

When this is closer to ready I can check it. You need to run 2 domains (or 2 subdomains) and have the forum on one and the script on another. A simple SSI page where you can open the user area popup is good enough for most things. Sending credentials such as on the login form may also need to be tested, but when you can open the user area, the CORS request works.

jdarwood007 avatar Feb 20 '24 22:02 jdarwood007

this latest commit adds support for either light or dark mode from system preferences—it does indeed change once I enable Dark Evil Computer Mode in Windows 10. @DiegoAndresCortes get to work ya scrub :P haha

Also we probably have too many variables. The ones for padding can be hardcoded.

live627 avatar Mar 01 '24 01:03 live627

Awesome, I’ll check it out soon!

@jdarwood007 vouched for that monstrous amount of variables so he should decide 🤣

DiegoAndresCortes avatar Mar 01 '24 03:03 DiegoAndresCortes

@jdarwood007 vouched for that monstrous amount of variables so he should decide 🤣

I'm probably going to write a script soon that hardcodes the variables soon since the increased filesize is annoying me. That, and no instructions means that I get to do it MY way 😈

live627 avatar Mar 09 '24 10:03 live627

I could do it manually later, I'm already fixing more issues that I discovered.

DiegoAndresCortes avatar Mar 09 '24 17:03 DiegoAndresCortes

Only use case I see for this would be something like:

Regular CSS:

.action_profile footer {
  padding-block: 70px;
}

Variables:

.action_profile {
  --footer-padding-block: 70px;
}

Or you know, modifying a cascade of elements with little effort, it's not an epic benefit from my pov.

DiegoAndresCortes avatar Mar 09 '24 20:03 DiegoAndresCortes

windowbg has various good use cases so I'll keep it on that one.

DiegoAndresCortes avatar Mar 09 '24 21:03 DiegoAndresCortes

Not all elements need to be variables. Typically I see it with things that handle colors, so dark/light mode is easy. High contrast mode is also possible—none need to be redefined border sizes, widths, padding/etc.

jdarwood007 avatar Mar 10 '24 01:03 jdarwood007

Have you ever thought of using Tailwind CSS? It would give more opportunities for everyone.

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    /* Base vars */
}

/* Base classes */
@layer components {
    .button {
        @apply inline-block px-2 py-1 text-gray-600 text-xs uppercase cursor-pointer min-h-[calc(2em+2em*(0.9-0.85))] border border-gray-300 rounded shadow-sm box-border align-middle;
    }
    
    /* etc ... */
}

dragomano avatar Apr 12 '24 05:04 dragomano

I’m not particularly interested as I don’t use it, and our CSS is still maintainable, just unorganized.

I do think layers could be useful now that you bring this up though.

DiegoAndresCortes avatar Apr 12 '24 13:04 DiegoAndresCortes

Icons in the admin area are not indented enough: sshot-11

Been looking at this today. What do you think of this instead? Screenshot_57

DiegoAndresCortes avatar May 04 '24 20:05 DiegoAndresCortes

can i haz rebase next week

DiegoAndresCortes avatar May 18 '24 21:05 DiegoAndresCortes