Code Monkey home page Code Monkey logo

stylus-lang.com's Introduction

Stylus logo

Build Status Maintenance npm version npm Join the community on github discussion

Stylus is a revolutionary new language, providing an efficient, dynamic, and expressive way to generate CSS. Supporting both an indented syntax and regular CSS style.

Sponsors

You can sponsor stylus ongoing development via opencollective or paypal !

automattic mojotech

Your Logo

Paypal stylus

Backers

Backers

Installation

$ npm install stylus -g

Basic Usage

Watch and compile a stylus file from command line with

stylus -w style.styl -o style.css

You can also try all stylus features on stylus-lang.com, build something with stylus on codepen or RunKit

Community modules

Stylus cheatsheet

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Contribution

Please read our Contribution Guide before making any pull requests to the project. Included are directions for opening issues, workflows, and coding standards.

Thank you to all the people who already contributed to Stylus!

License

MIT

Copyright (c) 2010-present TJ and Stylus maintainers

stylus-lang.com's People

Contributors

corysimmons avatar cspotcode avatar dhruvdutt avatar eddiemonge avatar futekov avatar groenroos avatar justincampbell avatar kizu avatar panya 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stylus-lang.com's Issues

Optimize site for speed

Currently we're loading the full jQuery lib and as far as I can see it's only for plugins.js and main.js which are short, simple, and can easily be rewritten in vanilla js with IE8 (or IE7?) support.

Domain

@kizu I'm leaving open-source. Can I transfer domain to you or someone at Automattic? I don't want to keep paying for it.

Negative variable

Negative variable issue.
If no colon after property, this property will ignored":

value = 100px

.foo 
    width 10px
    margin-left -(value)

wil render as:

.foo {
    width: 10px;
}

Overwriting variables in media queries

It seems that conditional overwriting of stylus variables with media queries isn't possible. For example, the following stylus code:

bg_color = white

@media (prefers-color-theme: dark)
    bg_color = black

body
    background: bg_color

Compiles to:

body {
  background: #fff;
}

Is this behavior intended? The documentation doesn't go into detail about how variables interact with media queries.

Cleanup design

  • "Footer" area needs love.
  • Should probably use an off-canvas menu. Received some complaints about the 1/3 screen-height menu on mobile. :}

Migrate Gitter to stylus/stylus

Stylus has a problem with fragmentation. I think it's fine to honor the patron of the language, but not at the cost of fragmenting the brand.

Perhaps we should migrate the Gitter to stylus/stylus, and add some buttons to that chat room on the main repo's README (as well as some other sweeeeeet badges) and on the website itself.

We should really try to migrate users to the same official-looking chat room in whatever ways we can.

tweaks

can someone clean up the credits? they look like crap

  • smaller fonts
  • sans
  • dark tomato color instead of white (same with tj's link)
  • i wish we could B&W and then color overlay Learnboost's logo so it matched the others
  • looks terrible on mobile
  • it'd be nice if we could just remove all the text like "originated at:", "supported by:" and just had a block list of links/logos

oh and the stylus organization on GitHub needs the new logo

Logo status

I've sent MojoTech an email about using the logo. They'll probably approve it at the beginning of next week. If they don't or it takes too long we can design a new logo for it in a few days.

Try Stylus not compiling valid code

I notice that sometimes the http://stylus-lang.com/try.html page does not compile correctly. I use it quite often to test how things will work or look (probably better to do locally, but it makes it easy to isolate and test code).

Example:

// Mixin
position(type, values...)
    properties = top right bottom left
    skip       = _

    // top value
    push(values, skip) if length(values) is 0

    // right value
    push(values, values[0]) if length(values) is 1

    // bottom value
    push(values, values[0]) if length(values) is 2

    // left value
    push(values, values[1]) if length(values) is 3

    position: type

    for property, index in properties
        {property}: values[index] if values[index] isnt skip

// Usage
.vh
.screen-reader-text
    position: absolute auto _ _ -999em
    width: 1px
    height: 1px
    overflow: hidden

Try Stylus!

It compiles just fine locally and on CodePen though (view compiled CSS)

stylus website underselling itself?

Hi just wanted to give you some feedback from the outside world :)

I came across stylus multiple times now, while searching for a portable less/scss-replacement.
However, it wasn't clear to me that stylus does accept brackets (scss/less syntax) at all!

Therefore, i think many devs skim thru the site and will probably think 'oh this is kindof coffeescript for css..nevermind'.

I would consider the bracket/semicolon-omission a feature, rather than the USP.

My advice: communicate 'a portable,flexible,etc less/scss-replacement' in the header. That will probably increase adoption for curious less/scss developers.

undocumented @import / @require behavior for index styling

Stylus currently resolves stylus files if they have the same name as their parent folder (with .styl extension).
For example:
given the following directory structure where test.styl is the input file and test.css is the output file

.
├── a
|   ├── a.styl
├── test.styl
├── test.css

and the following file contents

./test.styl

@require a

./a/a.styl

body
  background-color red

yields the following output
./test.css

body {
  background-color: #f00;
}

this seems like logical and intended behavior, but it appears to not be listed in the documentation ( or at least not in the @import.md index styles section:

@ import also supports index styles. This means when you @import blueprint, it will resolve
either blueprint.styl or blueprint/index.styl. This is really useful for libraries that want to expose all their features, while still allowing feature subsets to be imported.

Unless this behavior is unintended, it should probably be changed to something like:

@ import also supports index styles. This means when you @import blueprint, it will resolve
blueprint.styl, blueprint/index.styl, or blueprint/blueprint.styl . This is really useful for libraries that want to expose all their features, while still allowing feature subsets to be imported.

Domain renewal

Hey I just noticed in my spam folder that the domain is up for renewal tomorrow. I'm broke and don't really think it's worth it anyway. Maybe we should just put it on stylus.github.io or something?

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.