.mw-ref > a[ style~='mw-Ref' ]::after { content: '[' counter( mw-Ref, devanagari ) ']'; } .mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after { content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']'; } span[ rel='mw:referencedBy' ] > a::before { content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari ); }