jeblad created this task.
jeblad added a project: MediaWiki-extensions-WikibaseClient.
Restricted Application added subscribers: Liuxinyu970226, Aklapper.
Restricted Application added a project: Wikidata.

TASK DESCRIPTION
  A call like
  
    moin
    {{#statements:P856|from=Q291644}}
  
  gives
  
    xml
    <span>
      <span>
        <a rel="nofollow" class="external free" 
href="http://www.erna.no/";>http://www.erna.no/</a>
      </span>
    </span>
  
  which isn't quite easy to style. I guess some span-elements are put in there 
to give somewhat better control on the created layout, especially if there are 
several of them or qualifiers and sources are added.
  
  It would be better if the spans says something about what's inside. For 
example that first span has `wb-single-claim wb-external-link` and outer has 
`wb-multi-claim wb-external-link`. They could even have `data-claim-P856`.
  
  I bumped into this while trying to style a way to long link in an infobox, 
but found out I could not use the usual tricks to shorten the link content, 
because I could not properly target the span-elements containing the link. And 
yes, there are suboptimal alternative solutions, but missing one or more 
classes to target seems like an omission (or error). And (2) yes, it is 
possible to traverse the tag-soup by a js-function and add classes, but that is 
an unnecessary hack.

TASK DETAIL
  https://phabricator.wikimedia.org/T251031

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: jeblad
Cc: Aklapper, Liuxinyu970226, jeblad, darthmon_wmde, Nandana, lucamauri, Lahi, 
Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Wikidata-bugs, aude, Mbch331, DannyS712
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to