css-optimum-selector - Helps to extract shortest optimal css-selector and multi-selector.

  •        3

A module to identify an unique css selector for a jQuery element in a most efficient way. An input of two jQuery elements return a common CSS selector matching a pattern of both the input elements. Imagine an ordered list with n number of elements. To select all the elements in the list, one would skim through each of the element and find a common pattern of CSS selector among them. "CSS Optimum Selector" do it more intelligently. A input of just 2 elements from the list is enough to pull-out the common pattern and the module extracts a single CSS selector that can select all the list elements.

https://github.com/indix/css-optimum-selector

Dependencies:

jquery : ^3.1.1

Tags
Implementation
License
Platform

   




Related Projects

Sizzle - JavaScript CSS selector engine

  •    Javascript

Sizzle is a pure-JavaScript CSS selector engine designed to be easily dropped in to a host library. It has CSS 3 Selector support. It is designed for optimal performance with event delegation.

slick - Slick is a new standalone CSS Selector engine and CSS Selector string parser

  •    Javascript

Slick is a new standalone CSS Selector engine and CSS Selector string parser

Silon - Logic Gates and Adders in pure CSS

  •    CSS

Silon is an experiment in the true power of CSS selectors. Most people would not expect CSS selectors to be capable of expressing arbitrary boolean logic. However, thanks to the sibling selector (AND), the comma selector (OR), and the :not() selector, this is actually completely possible. Silon is also useful as a teaching aid when teaching boolean logic and adders; having a visual, fully interactive, diagram of a full adder is quite helpful in understanding how it works.

sentineljs - Detect new DOM nodes using CSS selectors (650 bytes)

  •    Javascript

SentinelJS is a tiny JavaScript library that lets you detect new DOM nodes using CSS selectors (650 bytes). SentinelJS uses dynamically-defined CSS animation rules (@keyframes) to hook into browser animationstart events when a new node matching a given CSS selector is added to the DOM. In general this should be more performant than using a Mutation Observer to watch the entire document tree for changes and iterating through all new child nodes recursively. SentinelJS performs one hash key lookup on calls to the animationstart event so the performance overhead is minimal. If you define the animation-name property on a CSS rule that overlaps with the selector in your SentinelJS watch function then only one of those animations will be called which could cause unexpected behavior. To get around this you can trigger SentinelJS watches from your CSS using custom animation names (see below).

css-selector - The CssSelector component converts CSS selectors to XPath expressions.

  •    PHP

The CssSelector component converts CSS selectors to XPath expressions. This component is a port of the Python cssselect library v0.7.1, which is distributed under the BSD license.


css-element-queries - CSS-Element-Queries Polyfill

  •    Javascript

Element Queries is a polyfill adding support for element based media-queries to all new browsers (incl. IE7+). It allows not only to define media-queries based on window-size but also adds 'media-queries' functionality depending on element (any selector supported) size while not causing performance lags due to event based implementation. It's a proof-of-concept event-based CSS element dimension query with valid CSS selector syntax.

put-selector - A high-performance, lightweight function for creating and manipulating DOM elements with succinct, elegant, familiar CSS selector-based syntax

  •    Javascript

This put-selector/put module/package provides a high-performance, lightweight (~2KB minified, ~1KB gzipped with other code) function for creating and manipulating DOM elements with succinct, elegant, familiar CSS selector-based syntax across all browsers and platforms (including HTML generation on NodeJS). The single function from the module creates or updates DOM elements by providing a series of arguments that can include reference elements, selector strings, properties, and text content. The put() function utilizes the proven techniques for optimal performance on modern browsers to ensure maximum speed. would create an element <div class="my-class"> (an element with a class of "my-class").

hcxselect

  •    C++

hcxselect is a small and fast CSS selector engine for C++. It parses CSS selector expressions and applies them to a set of document nodes (or a whole tree) parsed via htmlcxx, a simple non-validating HTML parser. Thus, it allows you to use CSS selectors in your C++ program without much bloat.

lining

  •    Javascript

An easy to use javascript plugin offers you complete DOWN-TO-THE-LINE control for radical web typography. In CSS we already have the selector ::first-line to apply style on the first line of element. But there is no selector like ::nth-line(), ::nth-last-line() or even ::last-line. Then I read an article A Call for ::nth-everything from CSS tricks. ::nth-line() is actually really useful in some situation.

specificity - A JavaScript module for calculating the specificity of CSS selectors

  •    Javascript

A JavaScript module for calculating and comparing the specificity of CSS selectors. The module is used on the Specificity Calculator website. Specificity Calculator is built for CSS Selectors Level 3. Specificity Calculator isn’t a CSS validator. If you enter invalid selectors it will return incorrect results. For example, the negation pseudo-class may only take a simple selector as an argument. Using a psuedo-element or combinator as an argument for :not() is invalid CSS3 so Specificity Calculator will return incorrect results.

Saas - CSS with superpowers

  •    Ruby

Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. Sass boasts more features and abilities than any other CSS extension language out there.

goquery - A little like that j-thing, only in Go.

  •    Go

goquery brings a syntax and a set of features similar to jQuery to the Go language. It is based on Go's net/html package and the CSS Selector library cascadia. Since the net/html parser returns nodes, and not a full-featured DOM tree, jQuery's stateful manipulation functions (like height(), css(), detach()) have been left off.Also, because the net/html parser requires UTF-8 encoding, so does goquery: it is the caller's responsibility to ensure that the source document provides UTF-8 encoded HTML. See the wiki for various options to do this.

enlive - a selector-based (à la CSS) templating and transformation system for Clojure

  •    Clojure

Enlive is a selector-based (à la CSS) templating library for Clojure. David Nolen wrote a nice tutorial.

enlive - a selector-based (à la CSS) templating and transformation system for Clojure

  •    Clojure

a selector-based (à la CSS) templating and transformation system for Clojure

surgeon - Declarative DOM extraction expression evaluator. 👨‍⚕️

  •    Javascript

Declarative DOM extraction expression evaluator. Powerful, succinct, composable, extendable, declarative API.

grunt-contrib-sass - Compile Sass to CSS.

  •    Javascript

Run this task with the grunt sass command. Sass is a preprocessor that adds nested rules, variables, mixins and functions, selector inheritance, and more to CSS. Sass files compile into well-formatted, standard CSS to use in your site or application.

floki - Floki is a simple HTML parser that enables search for nodes using CSS selectors.

  •    Elixir

Floki is a simple HTML parser that enables search for nodes using CSS selectors. Check the documentation.

cascadia - CSS selector library in Go

  •    Go

The Cascadia package implements CSS selectors for use with the parse trees produced by the html package. To test CSS selectors without writing Go code, check out cascadia the command line tool, a thin wrapper around this package.

qwery - a query selector engine

  •    HTML

Qwery is a modern selector engine built on top of querySelectorAll giving you practical utility. As of version 4.0, qwery no longer supports IE6 - IE8. If your application still requires this level of support, please see the final 3.x release.

upton - A batteries-included framework for easy web-scraping. Just add CSS! (Or do more.)

  •    HTML

Upton is a framework for easy web-scraping with a useful debug mode that doesn't hammer your target's servers. It does the repetitive parts of writing scrapers, so you only have to write the unique parts for each site. Just specify a URL to a list of links -- or simply a list of links --, an XPath expression or CSS selector for the links and a block of what to do with the content of the pages you've scraped. Upton comes with some pre-written blocks (Procs, technically) for scraping simple lists and tables, like the list function above.