Skip to content

Element-bidi by ahangarha

Screenshot of Element-bidi

Details

Authorahangarha

LicenseAGPL-v3

Categorybidi, bidirectional, element, matrix

Created

Updated

Code size1.2 kB

Code checksumd709c376

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

This style, adds bidi support to Element, makes it more user-friendly for mixed content (RTL/LTR).

Notes

Changelog

[0.3.0] - 2021-12-04

Added

  • Added direction fix for inline message editor

[0.2.0] - 2021-11-02

Added

  • Added padding fix for mx_Pill class

[0.1.1] - 2021-11-29

Fixed

  • Remove wrong style which was added for test but forgot to remove

[0.1.0] - 2021-11-29

Added

  • support for main message text, lists and code

Source code

/* ==UserStyle==
@name           Element-bidi
@namespace      github.com/openstyles/stylus
@version        0.3.0
@description    Add bidi support to Element (Matrix)
@author         Mostafa Ahangarha
==/UserStyle== */


@-moz-document domain("develop.element.io"), domain("app.element.io"), domain("chat.mozilla.org") {
  /* message text */
  .mx_EventTile_body {
    display: block;
    text-align: start;
  }
  /*to apply on those messages having only plain text*/
  .mx_EventTile_body:not(.markdown-body){
    unicode-bidi: plaintext;
  }
  
  .markdown-body pre > code {
    unicode-bidi: plaintext;
    text-align: start;
    display:block !important;
  }
  
  .mx_EventTile blockquote {
    text-align: start;
    unicode-bidi: plaintext;
  }
  
  /* fix lists view*/
  .markdown-body ol, .markdown-body ul {
    padding: 0;
    padding-inline-start: 2em;
  }
  
  .mx_Pill {
    /*set padding-right to the general rule of this class*/
    padding-right: 0.1em;

    /* Set the fix for padding */
    padding-inline-end:.4em
  }
  
  /* fix inline editor */
  .mx_BasicMessageComposer_input{
    unicode-bidi:plaintext;
    text-align:start;
  }
}

Reviews

No reviews yet.