Skip to content

API reference

eles.removeStyle — Collection > Style. Cytoscape.js signatures, parameters and return contract.

eles.removeStyle — Collection › Style

Preview · Collection › Style

Read in the complete API reference · All API members

#eles.removeStyle()

// Remove all keys
eles.removeStyle(): this

Remove per-element style bypasses from every element. Values return to those supplied by the stylesheet, including any configured transitions.

Returns this

this collection, for chaining

Example

cy.style({ bypasses: { a: { width: 60 } } });
cy.getElementById('a').removeStyle();
console.log(cy.getElementById('a').width()); // 30

Example graph and handle setup

#eles.removeStyle(name)

// Remove the specified keys
eles.removeStyle(name: string): this

Remove per-element style bypasses from every element. Values return to those supplied by the stylesheet, including any configured transitions.

Parameters
NameDescription
name: string

the property to un-bypass, dash-case or camelCase; omit to clear each element's whole bypass declaration

Returns this

this collection, for chaining

Example

cy.style({ bypasses: { a: { width: 60 } } });
cy.getElementById('a').removeStyle('width');
console.log(cy.getElementById('a').width()); // 30

Example graph and handle setup

Also spelled eles.removeCss.