Git Product home page Git Product logo

jquery.exdent's Introduction

                            jQuery.exdent

A small jQuery plugin to enable hanging punctuation[1], an advanced
typographic feature. Elements are only exdented, if they are at the
beginning of a line. The plugin changes the boring

             "Lorem  ipsum  dolor  sit  amet, consectetuer
             adipiscing elit. Ut a sapien. Aliquam aliquet
             purus  molestie  dolor. Integer  quis eros ut
             erat posuere dictum.

to this:

            "Lorem  ipsum  dolor  sit  amet,  consectetuer
             adipiscing elit. Ut a sapien. Aliquam aliquet
             purus  molestie  dolor. Integer  quis eros ut
             erat posuere dictum.

You can customize the plugin to fit your exdentation needs:

    $('blockquote, q').exdent({
      by: '.5em'
    });

This exdents both <blockquote> and <q>  by  0.5em.  Apart from that
you can use jQuery's CSS function to set exdentation:

    $('q').css('exdent', '.5em');

See [2] for a demo and [3] for issues.


--

O p t i o n s :

jQuery.exdent understands these option parameters:

- by  (String):  the width  by which to exdent,  this is a positive
  value.
- detect (Boolean or String): whether to autodetect the exdentation
  width (will ignore "width").  If a string is given,  this is used
  for detection, otherwise an english opening quote, U+201C.
- className  (String):  class  to  add  to  /  remove from exdented
  elements.


--

Note: Don't confuse this with jQuery.extend. ;-)


--

[1] http://en.wikipedia.org/wiki/Hanging_punctuation
[2] http://boldewyn.github.com/jQuery.exdent/
[3] https://github.com/Boldewyn/jQuery.exdent/issues

jquery.exdent's People

Contributors

boldewyn 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

Watchers

 avatar  avatar  avatar

jquery.exdent's Issues

Trick Opera to multiline indents

Opera 11.52 doesn't indent elements, that are not first children of their block parent.

position:relative could be used, but then we have a gap afterwards. And apart from that both start and end indenting might be near to impossible with it.

Implement end exdenting

Currently we only exdent at the start. End indenting and indenting both sides should be there, too.

Seems not too problematic, when I tested it in Firebug. We have to figure out a useful API though.

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.