Coder Social home page Coder Social logo

khang-nd / 7.css Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 68.0 1.58 MB

A JS-independent, tree-shakeable CSS framework for building faithful recreations of the Windows 7 UI.

Home Page: https://khang-nd.github.io/7.css/

License: MIT License

JavaScript 7.93% SCSS 92.07%
css html scss ui-design windows-7

7.css's Introduction

With ❤ crafting - For 💯 striving

Hey there, I'm Khang Nguyen Duy. A software developer and a front-end enthusiast.
Connect with me in any social platform below.

Github Viblo DEV Twitter Linkedin

7.css's People

Contributors

2lag avatar andreymazepas avatar botoxparty avatar cassiohub avatar dependabot[bot] avatar elchininet avatar gitpaladin avatar hohaicongthuan avatar jacob-macleod avatar jdan avatar joaonunomota avatar kaytwo avatar khang-nd avatar loama avatar mattbegent avatar modernserf avatar mpopv avatar muan avatar n055 avatar neverage avatar rbstrachan avatar sirocyl avatar teodragovic avatar xheinrich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

7.css's Issues

menubar / menus

Great project!

Would be awesome to also have menubar / menu component.

Animations for regular controls

Many windows 7 controls natively had animations: buttons, checkboxes, radio buttons had fade-in for their backgrounds on hover.

There is also an interesting detail--the glass reflections in windows 7 were actually fixed, that is, moving the window did not move where the reflections were on the screen.

I'm not sure if the second is reasonably implementable in css--it might end up difficult or impossible, but the former is probably doable with a bunch of transition: statements.

use cases for 7.css

Hi everyone.

concept

I would like to provide a concise list of 9 use cases for the 7.css library (this list is not complete but partial). My hope in this thread is to tell how an open 7.css project helped me.

use case

use case 1: Boomerang-Project & 7.css

Lately I've been involved with creating and customizing themes for linux. One of the themes I'm involved in and helping with some design ideas is the Windows 7 theme from the Boomerang-Project (which is an open project that creates or stores themes for linux with gtk). Note: I haven't submitted the pull request yet, but part of the theme - I mean the design should be based on 7.css - is something I'm working on and I should submit it someday to the repository where the Windows 7 gtk theme... can stay.

use case 2: Electron & 7.css

Another use case I use 7.css is software written in Electron that I'm creating to look like a Windows 7 program to the end user.

use case 3: Os.js & 7.css

Lately I've been involved with the idea of operating systems in browsers, one operating system that has caught my attention is the OS.js project which looks a lot like the standard linux interface like a kubuntu etc.

One of the features I think of sending is "managing themes", my idea is to have something similar to OpenShellMenu which is software that customizes the user experience in Windows by selecting the way the menu is displayed. My idea is to have an OpenShellMenu in OS.js, I think in that sense to use 7.css so that anyone can easily change the OS.js system to look like Windows 7.

use case 4: Prototype & 7.css

It's very common when we write software - to carry out various tasks such as testing, implementation, deployment, technical documentation, among other things. A library with the design of an operating system facilitates the work of screen prototyping. This avoids wasting time with testing, implementation, deployment and documentation if I can gradually increase an overview and visual of what will be done for the end customer.

It's 2022, and in my special case I'm still developing software on Windows, Linux with old or legacy versions. In the specific case of Windows, usually the Windows XP, Windows 7 and Windows 10 versions. The Windows 11 version I still don't use so often. I said about the Windows XP version because I must use some CSS library for the screen prototype, as well as I use the 7.css version for the screen prototype like Windows 7.

use case 5: Simulation of software implementation/deployment & 7.css

In the previous case, I spoke about the screen prototype and how it avoids wasting time developing something without prior approval or use by the end user. The same example I mentioned earlier can serve as a basis for something I call Simulation of software implementation/deployment - which is basically testing a software implementation/deployment for the end user. Instead of spending ram memory and hours of testing on virtual machines and virtualization, a practical way is to have software that simulates certain scenarios of errors or software problems. In this sense, I imagine using the 7.css library to simulate certain error scenarios or software problems before anything else, virtualization, container, etc.

use case 6: Training users in a corporate, business environment & 7.css

It is very common to have difficulties using certain software, we can help train people using a simulation, something similar to Windows 7. In the previous case I spoke about screen prototyping and also about software simulation, this case applies to simulation of software to train users before the software is fully developed. A library like 7.css can help me train users who are going to use some version of my software on Windows 7.

use case 7: demo & 7.css

It is common to use things like mvp (minimal value product) and poc (proof of concept) to test ideas or concepts before spending time, money or opening a company or launching a product, idea or service in the information technology market, software in general. A library like 7.css can help me create live or offline demos for things like mvp, poc

use case 8: web components and/or block protocol & 7.css

In the previous cases I talked about concepts like poc, mvc, screen prototype, simulation. We can create web components and/or block protocol to structure software(version Windows 7) with 7.css and distribute in a cdn network, that way any company can avoid losing hours of development, implementation, deployment of software in windows 7 environments

use case 9: ReactOS & 7.css

Lately I've been involved with the idea of a Windows operating system that is - ReactOS(which tries to look like Windows XP... free/libre). I'm thinking of following the 7.css style guide to help with ReactOS UI/UX design.

why did you write an issue about it?

  1. My hope in this thread is to tell how an open 7.css project helped me.
  2. All of you can use this information as a "showcase" to define the use of the 7.css library - so that people can see that the project is very interesting and what are the scenarios where the library is used
  3. I would like to provide a concise list of 9 use cases for the 7.css library (this list is not complete but partial).

demo

image

image-description: As we can see in the image we have the 'showcase' information - where the library is used in the README.md file.

question/feedback

What do you all think of the idea?

Styling partly broken in Safari on iOS

IMG_4567 - Copy
When opening a file that uses 7.css, including the documentation, the window pane buttons are too small and missing their icons. The screenshot showing the issue occurring in documentation is attached.

Using iPhone 8 with iOS 14.4.2

Issue with toggling between Tabs

I copied the code directly into repl.it for "Another window with contents" - the example which has a window body with three tabs (music, dogs, food).

For some reason, when I click on the other tabs (Dogs, Food), the content doesn't toggle to the content designated to those tabs/buttons. It just stays fixed on the "Music" content.

I tried the same thing with copying the two "Tabs" code snippets, and I get the same issue. Clicking any of the other tabs does nothing - the content stays static.

I know I've imported the 7.css file correctly because all of the other code snippets work (i.e. buttons, menu bars, etc.).

Has anyone had this issue? Anyone know how to fix this?

Scrollbar

do you have the scrollbar styling instead of the whole stylesheet as its not available on the gui page on unpkg

How can I avoid this kind of conflict?

First of all, thanks for such awesome library! my issue is I'd like to use this library to style a specific (React) component but it's changing everything else in the application, including the main page's default scrollbar and the tab component I'm using. for example the tab look like this:

image

instead of this:

image

the code to generate this tab look like this. I believe most part of conflict could be solved using unique name to classes? maybe adding the library name prefix or something...

Flexible font sizing

Currently font sizes for control elements (e.g. buttons) are hard-coded to 9pt. It'd be better to apply em and rem unit throughout for font sizing. Although, it is a "faithful reproduction", I believe that this request might actually result in enhanced accessibility.

Tabs aren't working properly

Working on a personal webpage, and I wanted to let you know that I haven't been able to get my tabs to work properly in case this is an issue on your end!! I took the code straight from your 7.css webpage, and I can't seem to switch over from one tab to the other. If this is my fault though then please feel free to disregard this, I just figured I'd create an issue just in case it's something you need to fix :)

GIF 2023-10-08 7-17-10 PM
Screenshot_103

Use `<span>` instead of `<i>` for menu shortcut mnemonic

<i> is not the appropriate tag for this, especially when the font-style has been overridden below. Consider using <span which is used to supply markup for grouped elements, grouped due to there being multiple heterogenous characters, e.g. F and 2 for F2; Ctrl, +, X for Ctrl + X; so on and so forth.

Originally posted by @swarmukhdefault in #46 (comment)

Input Text Cut Off in Safari 14

Thank you for this great library.

I noticed that when loading the documentation page on OS X using Safari 14, the text entered into input boxes is cut off at the bottom:

Safari 14 Broken Text Input

The same problem occurs on iOS Safari.

I've investigated a bit and the problem seems to be related to this line height property. Disabling this line-height property via Developer Tools seems to fix the issue: Safari 14 Fixed Input Line

<label> with embedded inputs problematic (should behave like <label for=x>)

Thanks for a great looking CSS!
One problem: it requires <label> to use for="", and doesn't support embedded inputs.
This then requires us to generate a unique id for each labelled input, which bloats the HTML unnecessarily.

For example:
An input embedded in a <label> renders no gap between the label text and the input.
A radio embedded in a <label> fails to render the radio at all.

Is that possible to fix? I'd love to contribute a fix, but my CSS knowledge is sketchy at best.

Window's border background doesn't get overriden

Hi! I've been using you library to create a couple of React components, but I've noticed that if a parent element has a background or background-color property set, all the borders of the window use that color instead of the expected gradient.

I've created a simple codesandbox if it helps:

https://codesandbox.io/s/thirsty-wright-rm98t6?file=/index.html

If I remove the background-color, the borders re-appear. I think it has to do with the z-index of the .window::before but I'm not a style expert haha

the best

css ui library i've seen so far in my life. LOVE IT!

Issue with tabs (easy fix)

I'm not 100% certain, but I am pretty darn close to it, that this line in the code is what is causing a 1 pixel offset between the tab's end (while selected), and the lower window that the tab is meaning to enable. As seen here:
image

Missing style `button:disabled` implement.

The disabled button rendered with solid background rather than gradient. See below Apply button.

image

But the 7.css missing button:disabled style which show the exact same border and background.

image

Will you add more features

Hi,
This is an awesome project. will you add more features?

1、layout support: flex, grid,
2、more components : toolbars, table, group box, icons

Inactive window styles

This is absolutely amazing, thank you!

Styles for "inactive" windows, i.e. those that are not focused, would be cool.

Tabs are not working

<section class="tabs">
  <menu role="tablist" aria-label="Tabs Template">
    <button role="tab" aria-controls="tab-A" aria-selected="true">Tab A</button>
    <button role="tab" aria-controls="tab-B">Tab B</button>
    <button role="tab" aria-controls="tab-C">Tab C</button>
    <button role="tab" aria-controls="tab-D" disabled>Tab D</button>
  </menu>
  <article role="tabpanel" id="tab-A">Tab A is active</article>
  <article role="tabpanel" id="tab-B" hidden>Tab B is active</article>
  <article role="tabpanel" id="tab-C" hidden>Tab C is active</article>
  <article role="tabpanel" id="tab-D" hidden>Tab D is inactive</article>
</section>

I have pasted this code in angular but I don't know why the tabs are not working. I got the UI as it is mentioned in the page But If I click tab-B/C it is not showing me Tab B is active/C is active. Do we need to add any custom javascript code for this. If not can you please help me with this issue. Thanks in Advance.

MessageBox

how to create MessageBox ? I tried creating Dialog box but I couldn't show the dialog using js

Remove padding for menubar inside a window

Currently, window-body adds a padding of 6px. It'd be better if either:

  1. A new CSS rule is added, OR,
  2. The window structure is slightly altered

to better fit the menu in a window. In that way, end-users can leverage an MDI (Multiple Document Interface) look-n-feel

[Dropdown] Inconsistent appearance

The visual appearance of the dropdown varies a lot across different OSes and browsers. Here are some examples:

OS | Browser Image OS | Browser Image
Windows 7's dropdown dropdown menu reference Windows 11 | Brave Win11_Brave
Windows 10 | Brave Win10_Brave Linux (Kubuntu) | Brave Kubuntu_Brave
Windows 10 | Edge Win10_Edge Windows 10 | Firefox Win10_Firefox

(There's more but you get the idea)

Quick fixes

  • Groupbox label (fieldset's legend) font style
  • Button, dropdown (select) text color for Safari

Missing Images when loading from unpkg.com

Hello,

when I load the CSS from unpkg.com, the images (for example minimize.png, maximize.png and close.png for the Windows title bar) are missing.

Thanks in Advance & Greetings ... Peter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.