Added matrix function closes #8236#8249
Added matrix function closes #8236#8249abdultalha0862 wants to merge 7 commits intoCodecademy:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Codecademy Docs term entry documenting the CSS matrix() transform function (issue #8236), including illustrative images for the examples.
Changes:
- Added a new term entry at
content/css/concepts/transform-functions/terms/matrix/matrix.md. - Added three example output images under
media/and referenced them from the entry.
Reviewed changes
Copilot reviewed 1 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| content/css/concepts/transform-functions/terms/matrix/matrix.md | New documentation page for CSS matrix() including syntax, parameters, and examples with images. |
| media/matrix-example-1.png | Output image for Example 1 (translation). |
| media/matrix-example-2.png | Output image for Example 2 (scaling). |
| media/matrix-example-3.png | Output image for Example 3 (combined transform). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
content/css/concepts/transform-functions/terms/matrix/matrix.md
Outdated
Show resolved
Hide resolved
|
|
||
| The CSS `matrix()` function uses a 2D matrix to scale, rotate, skew, and move an element. This combined setup puts multiple changes into one step and is commonly used in detailed animations[(https://www.codecademy.com/resources/docs/css/animations)], exact placement, or creative web layouts. | ||
|
|
||
| ## CSS `matrix()` Syntax |
There was a problem hiding this comment.
For term entries, the style guide/template expects the syntax section header to be exactly ## Syntax. Using a different header (e.g., ## CSS matrix() Syntax) can make the structure less consistent across entries and tooling that looks for standard sections.
| ## CSS `matrix()` Syntax | |
| ## Syntax |
|
@mamtawardhani I have submitted the issue #8236. Ready for the review Please let me know if there are any changes |
|
In line 19 Copilot suggested this change but in the Official Docs we need to follow this format Which one should I follow? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| Here is the output: | ||
|
|
||
|  |
There was a problem hiding this comment.
The image alt text could be more descriptive to better match the pattern used in other transform function entries. Consider using something like "A medium sea green colored box scaled to 1.5 times horizontally and 2 times vertically using the CSS matrix() function" to provide more context for accessibility.
|  | |
|  |
|
|
||
| Here is the output: | ||
|
|
||
|  |
There was a problem hiding this comment.
The image alt text could be more descriptive to better match the pattern used in other transform function entries. Consider using something like "A steel blue colored box with combined scaling, skewing, and translation applied using the CSS matrix() function" to provide more context for accessibility.
|  | |
|  |
|
|
||
| Here is the output: | ||
|
|
||
|  |
There was a problem hiding this comment.
The image alt text could be more descriptive to better match the pattern used in other transform function entries. For example, rotate.md uses "The CSS rotate() function rotates a box 45 degrees clockwise from its original position, creating a diamond-like appearance". Consider using something like "A coral colored box translated 100 pixels to the right and 100 pixels down using the CSS matrix() function" to provide more context for accessibility.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## Example 1: Basic Translation in CSS Using `matrix()` | ||
|
|
||
| In this example, the `.box` element is moved `100px` to the right and `100px` down using CSS `matrix()`, demonstrating how the `e` and `f` parameters control horizontal and vertical translation: |
There was a problem hiding this comment.
These example headers exceed the style guide recommendation that headers not exceed 5 words (and many existing transform-function terms use short headers like ## Example 1). Consider shortening these to ## Example 1, ## Example 2, etc., and moving the descriptive text into the paragraph body (or into ### subheaders).
|
|
||
|  | ||
|
|
||
| ## Example 2: Scaling Elements in CSS Using `matrix()` |
There was a problem hiding this comment.
Same header-length issue as above: this header is longer than the style guide’s recommended maximum (5 words). Please shorten it for consistency/readability.
|
|
||
|  | ||
|
|
||
| ## Example 3: Combined Transformation in CSS With the Help of `matrix()` |
There was a problem hiding this comment.
Same header-length issue as above: this header is longer than the style guide’s recommended maximum (5 words). Please shorten it for consistency/readability.
| ## Example 3: Combined Transformation in CSS With the Help of `matrix()` | |
| ## Example 3: Combined matrix() transform |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Added CSS
matrix()Transform Function DocumentationIssue Solved
#8236
Type of Change
Checklist
mainbranch.Issues Solvedsection.