Coder Social home page Coder Social logo

userstyles's Introduction

Theming websites - overiding with css

css are styling elements of a html page, allmost all websites have fancy elements which are results of this.

websites are themed by defining custom css and making them override the original.

2 commons ways to do this,

  • using plugins or addons
  • defining in userContent.css

Using Plugins - stylish, stylus

  • finding styles and applying on the fly with inline check

inline_find

  • user freedom to customize styles (depends on the creator), css in this repo allows user to choose 3 colors (foreground, background and outline) stylish plugin replaces syntax /*[[color]]*/ with appropirate label [more]

choosing color

Defining in userContent.css (specific for firefox)

[guide] along with chrome/userChrome.css (not necessary for this particular purpose) create a file chrome/userContent.css

when variables are defined in userContent.css it effects globally

:root {
    --background: #000000;
    --foreground: #b7e0b6;
    --outline: #809c7f;
}

instead of explicitly choosing colors for each website styles, using variables like background: var(--background) !important; in all styles will use colors defined in userContent.css (uniform theme among different websites)

css in styles plugin along with appropriate namespace eg: @-moz-document domain("duckduckgo.com") can be copied to userContent.css directly so external plugin is no longer needed.

Screenshots

(images will redirect to userstyles.org)

physicsforums

duckduckgo

Notes

  • when using 'inspect element' try to find inherited parts so effects are throughout instead of defining in this element {..} unless that's what you're intended.

  • good intro about css noob-friendly guide from mozilla

    license

userstyles's People

Contributors

hisacro avatar

Watchers

 avatar  avatar

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.