-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from open-craft/maxim/fix-tables-rendering
fix: rendering tables [BB-6729]
- Loading branch information
Showing
13 changed files
with
200 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
html_xblock/static/css/html.css → html_xblock/static/css/html_edit.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* This css file contains styles that should be used for the XBlock preview in | ||
* studio. | ||
* | ||
* It contains the fix for rendering tables in studio preview, which is | ||
* caused by global studio styles. These global styles set `border: 0;` for | ||
* tables and their elements, which removes the borders from these elements. */ | ||
|
||
/* fall back to default browser styles for all rows; the inline styles (like | ||
* border style and color) would overwrite it */ | ||
.studio-xblock-wrapper [data-block-type="html5"] table > * > tr { | ||
border: unset; | ||
} | ||
|
||
/* fall back to default browser styles, if border attribute is not set; the | ||
* inline styles (like border style and color) would overwrite it */ | ||
.studio-xblock-wrapper [data-block-type="html5"] table:not([border]) { | ||
border: unset; | ||
} | ||
|
||
/* default styles for any table that had border attribute set; the inline | ||
* styles (like border style and color) would overwrite it */ | ||
.studio-xblock-wrapper [data-block-type="html5"] table[border] { | ||
border: 1px solid black; | ||
} | ||
|
||
/* change the border width, depending on the explicit value of the border | ||
* attribute */ | ||
.studio-xblock-wrapper [data-block-type="html5"] table[border="1"] { | ||
border-width: 1px; | ||
} | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border="2"] { | ||
border-width: 2px; | ||
} | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border="3"] { | ||
border-width: 3px; | ||
} | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border="4"] { | ||
border-width: 4px; | ||
} | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border="5"] { | ||
border-width: 5px; | ||
} | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border="6"] { | ||
border-width: 6px; | ||
} | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border="7"] { | ||
border-width: 7px; | ||
} | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border="8"] { | ||
border-width: 8px; | ||
} | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border="9"] { | ||
border-width: 9px; | ||
} | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border="10"] { | ||
border-width: 10px; | ||
} | ||
/* etc until the value we think is reasonable */ | ||
|
||
.studio-xblock-wrapper [data-block-type="html5"] table[border] > * > tr > td, | ||
.studio-xblock-wrapper [data-block-type="html5"] table[border] > * > tr > th, | ||
.studio-xblock-wrapper [data-block-type="html5"] table[border] > * > td, | ||
.studio-xblock-wrapper [data-block-type="html5"] table[border] > * > th, | ||
.studio-xblock-wrapper [data-block-type="html5"] table[border] > td, | ||
.studio-xblock-wrapper [data-block-type="html5"] table[border] > th { | ||
border-width: thin; | ||
border-style: inset; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
# Requirements for app run | ||
|
||
git+https://github.com/edx/[email protected]#egg=xblock-utils==2.1.1 | ||
django-statici18n==1.9.0 | ||
edx-i18n-tools==0.5.3 | ||
Mako==1.1.3 | ||
bleach # version unpinned to make it compatible with Maple/Nutmeg (4.1.0) | ||
# bleach[css]==5.0.0 # Use this for Olive | ||
django~=2.2 | ||
xblock-utils==2.2.0 | ||
edx-i18n-tools==0.9.1 | ||
bleach==4.1.0 # version pinned for Maple | ||
# bleach[css]==5.0.0 # Use this for Nutmeg | ||
django==3.2.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
# Requirements for code quality checks | ||
|
||
isort==4.3.21 | ||
astroid==2.3.3 | ||
pycodestyle==2.6.0 | ||
pydocstyle==5.0.2 | ||
pylint==2.4.2 | ||
caniusepython3==7.2.0 | ||
edx-lint==1.4.1 | ||
isort==5.10.1 | ||
pycodestyle==2.9.1 | ||
pydocstyle==6.1.1 | ||
pylint==2.15.3 | ||
edx-lint==5.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
# Requirements for test runs | ||
|
||
codecov==2.0.15 | ||
diff-cover==2.6.1 | ||
django-nose==1.4.4 | ||
lazy==1.4 | ||
pytest-cov==2.8.1 | ||
tox==3.15.0 | ||
tox-battery==0.6.0 | ||
mock==3.0.5 | ||
|
||
# Github requirements | ||
git+https://github.com/edx/[email protected]#egg=django-pyfs==2.1 | ||
codecov==2.1.12 | ||
diff-cover==7.0.1 | ||
pytest-cov==4.0.0 | ||
mock==4.0.3 | ||
xblock-sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.