Skip to content

TangoMan Pivot CSS is an extension of pico.css, the minimal CSS framework for semantic HTML.

License

Notifications You must be signed in to change notification settings

TangoMan75/pivot

GH language GH release GH license GH stars Javascript CI Visitors

💫 TangoMan Pivot CSS

TangoMan Pivot CSS is a lightweight extension of pico.css, (the minimal CSS framework for semantic HTML) focused on providing a boilerplate for building single page applications.


📚 Documentation

Documentation can be found here : https://tangoman75.github.io/pivot

🚀 Features

⚡ JavaScript Features

  • Toast Notifications: Manages toast notifications with flexible positioning.
  • Tabs: Enables accessible tabbed navigation with event listeners.
  • Theme Toggle: Toggles between light and dark themes with a button.
  • Menubar Collapse: Adds functionality for collapsing menubars on smaller screens.
  • Close Buttons: Automatically removes elements with the close class when clicked.
  • Animations: Adds event listeners for animating elements with the animate class.

⚡ Colors

  • Defines a minimal color palette for success, warning, and danger elements.

⚡ Layout Enhancements

  • Adds a flex class for flexible layouts.
  • Fixes grid layout for <article> elements.

⚡ Scroll Behavior

  • Enables smooth scrolling with scroll-behavior: smooth.
  • Sets scroll-margin-top for <main>, <section>, and <article> elements for better navigation.

⚡ Section Styling

  • Styles section headers with a bottom border.

⚡ Table Styling

  • Styles table headers within <tbody> with bold font weight and nowrap.

⚡ Icon Integration

  • Provides a generic icon class for SVG icons.
  • Adds specific icon classes for checkbox, minus, chevron, date, time, search, close, loading, valid, and invalid icons.

⚡ Form Styling

  • Customizes <fieldset> appearance with padding, border, and <legend> styles.

⚡ Alert Messages

  • Adds styled alert messages with info, success, warning, and danger variations, with custom colorations.

⚡ Semantic Buttons

  • Adds styled buttons with "success," "warning," and "danger" states.

⚡ Close Button

  • Provides a close class for styled close buttons.

⚡ Footer Styling

  • Styles the <footer> with a flexible layout and list styles.

⚡ Navbar Enhancements

  • Improves <navbar> layout and adds a sticky header effect for larger screens with a blur effect.
  • Adds a divider to icon groups within the navbar.

Tabs Component

TangoMan Pivot CSS provides accessible, flexible, and customizable tabbed navigation using ARIA roles and keyboard navigation support.

⚡ Theme Toggle

  • Adds styling for theme toggle icons with animations.

⚡ Toast Notifications

  • Provides a #toast-container for displaying toast notifications with flexible positioning.

⚡ Toolbar

  • Adds styles for menubar and toolbar roles with inline and accessible designs.

⚡ Animations

  • Includes reusable animation classes:
    • .from-left for sliding in from the left.
    • .spin for spinning elements.
    • .zoom-in-blur for zoom and fade-out effect.
  • .animate for inline-block animation context.
  • .remove-pseudo-elements class removes :before and :after pseudo-elements from elements to avoid them messing with animation.

⚡ Utility Classes

  • Adds utility classes like no-decoration for removing text or list decorations.
  • Provides flex and flex-right classes for easy layout.
  • Provides ellipsis class for text truncation with ellipsis.
  • Adds a .divider class for visual separation in navigation and toolbars.

⚡ Responsive Menubar & Navbar

  • Menubar and navbar adapt to screen size, with collapsible menu and sticky header on large screens.

⚡ Toast Container Positioning

  • #toast-container supports flexible positioning: top-right, top-left, bottom-left, etc.

🛠️ Usage

  1. Include pico.css: Ensure you have pico.css included in your project.
  2. Include TangoMan Pivot CSS: Add pivot.css to your project and include it after pico.css.
  3. Include TangoMan Pivot JavaScript: Add pivot.js to your project and include it at the end of your file.
  4. Use the provided classes: Apply the classes defined in pivot.css to your HTML elements.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Pico CSS Project</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
    <link rel="stylesheet" href="./css/pivot.css">
</head>
<body>
    <main class="container">
        <section>
            <header>
                <h2>Example Section</h2>
            </header>
            <article>
                <header>
                    <h3>An article</h3>
                </header>
                <p>This article has scroll margin.</p>
                <p>These items own a flex layout.</p>
                <div class="flex">
                    <div>Item 1</div>
                    <div>Item 2</div>
                    <div>Item 3</div>
                </div>
                <p>This is a list.</p>
                <ul class="list--bare">
                    <li>Item without bullets</li>
                    <li>Another item</li>
                </ul>
                <div class="alert alert--success">
                    <header>Success!</header>
                    <p>This is a success alert.</p>
                    <footer>More information here.</footer>
                    <button class="close"></button>
                </div>
            </article>
        </section>
    </main>
    <footer class="footer container">
        <ul>
            <li>item 1</li>
            <li>item 2</li>
        </ul>
        <p>Copyright 2025</p>
    </footer>
    <script type="text/javascript" src="./js/pivot.js"></script>
</body>
</html>

⚡ Custom Prism.js Syntax Highlighting

  • Provides styles for Prism.js code highlighting, including dark/light theme support.

📦 Installation

🚨 Production

You can download pivot.css from the GitHub repository or include it via CDN.

✅ Development

To setup your development environment, follow these steps:

  1. Install Dependencies:

If you have yarn installed, run the following command in the project's root directory:

yarn install

This command installs all the necessary development dependencies.

  1. Run Development Scripts:

To start the development environment or build the CSS, use the following command:

yarn run

This command will execute the default script defined in the package.json file.

You can run specific scripts like so:

# watch source folder
yarn watch
# lint scss
yarn lint
# build css
yarn build

🤝 Contributing

Thank you for your interest in contributing to TangoMan Pivot CSS.

Please review the code of conduct and contribution guidelines before starting to work on any features.

If you want to open an issue, please check first if it was not reported already before creating a new one.

📜 License

Copyrights (c) 2025 "Matthias Morin" <[email protected]>

License Distributed under the MIT license.

If you like TangoMan Pivot CSS please star, follow or tweet:

GitHub stars GitHub followers Twitter

... And check my other cool projects.

🙏 Acknowledgements

  • picocss: Minimal CSS Framework for semantic HTML
  • prismjs: Lightweight syntax highlighter
  • cbracco: html5-test-page

👋 Let's Build Your Next Project Together !

Looking for an experienced Full-Stack Partner ?

Clean code. Clear communication.

From first sketch to final launch, I've got your back.

tangoman.io

About

TangoMan Pivot CSS is an extension of pico.css, the minimal CSS framework for semantic HTML.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published